CPD Results
The following document contains the results of PMD's CPD 7.12.0.
Duplications
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseTransInfoSet.java | MoneyWise Personal Finance - Core | 216 |
| net\sourceforge\joceanus\moneywise\data\validate\MoneyWiseValidateTransInfoSet.java | MoneyWise Personal Finance - Core | 64 |
: isClassRequired(myClass);
}
@Override
public MetisFieldRequired isClassRequired(final PrometheusDataInfoClass pClass) {
/* Access details about the Transaction */
final MoneyWiseTransaction myTransaction = getOwner();
final MoneyWiseTransCategory myCategory = myTransaction.getCategory();
/* If we have no Category, no class is allowed */
if (myCategory == null) {
return MetisFieldRequired.NOTALLOWED;
}
final MoneyWiseTransCategoryClass myClass = myCategory.getCategoryTypeClass();
if (myClass == null) {
return MetisFieldRequired.NOTALLOWED;
}
/* Switch on class */
switch ((MoneyWiseTransInfoClass) pClass) {
/* Reference and comments are always available */
case REFERENCE:
case COMMENTS:
case TRANSTAG:
return MetisFieldRequired.CANEXIST;
/* NatInsurance and benefit can only occur on salary/pensionContribution */
case EMPLOYERNATINS:
case EMPLOYEENATINS:
return myClass.isNatInsurance()
? MetisFieldRequired.CANEXIST
: MetisFieldRequired.NOTALLOWED;
/* Benefit can only occur on salary */
case DEEMEDBENEFIT:
return myClass == MoneyWiseTransCategoryClass.TAXEDINCOME
? MetisFieldRequired.CANEXIST
: MetisFieldRequired.NOTALLOWED;
/* Handle Withheld separately */
case WITHHELD:
return isWithheldAmountRequired(myClass);
/* Handle Tax Credit */
case TAXCREDIT:
return isTaxCreditClassRequired(myClass);
/* Handle AccountUnits */
case ACCOUNTDELTAUNITS:
return isAccountUnitsDeltaRequired(myClass);
/* Handle PartnerUnits */
case PARTNERDELTAUNITS:
return isPartnerUnitsDeltaRequired(myClass);
/* Handle Dilution separately */
case DILUTION:
return isDilutionClassRequired(myClass);
/* Qualify Years is needed only for Taxable Gain */
case QUALIFYYEARS:
return isQualifyingYearsClassRequired(myClass);
/* Handle ThirdParty separately */
case RETURNEDCASHACCOUNT:
return isReturnedCashAccountRequired(myClass);
case RETURNEDCASH:
return isReturnedCashRequired(myTransaction);
case PARTNERAMOUNT:
return isPartnerAmountClassRequired(myClass);
case XCHANGERATE:
return isXchangeRateClassRequired(myClass);
case PRICE:
return isPriceClassRequired(myClass);
case COMMISSION:
return isCommissionClassRequired(myClass);
default:
return MetisFieldRequired.NOTALLOWED;
}
}
/**
* Determine if an infoSet class is metaData.
* @param pClass the infoSet class
* @return the status
*/
public boolean isMetaData(final MoneyWiseTransInfoClass pClass) {
/* Switch on class */
switch (pClass) {
/* Can always change reference/comments/tags */
case REFERENCE:
case COMMENTS:
case TRANSTAG:
return true;
/* All others are locked */
default:
return false;
}
}
/**
* Determine if a TaxCredit infoSet class is required.
* @param pClass the category class
* @return the status
*/
private MetisFieldRequired isTaxCreditClassRequired(final MoneyWiseTransCategoryClass pClass) {
final MoneyWiseTransaction myTrans = getOwner();
final MoneyWiseTaxCredit myYear = myTrans.getTaxYear();
final MoneyWiseTransAsset myAccount = myTrans.getAccount();
/* Switch on class */
switch (pClass) {
case TAXEDINCOME:
return MetisFieldRequired.MUSTEXIST;
case LOANINTERESTCHARGED:
return MetisFieldRequired.CANEXIST;
case LOYALTYBONUS:
case INTEREST:
return myAccount.isTaxFree()
|| myAccount.isGross()
|| !myYear.isTaxCreditRequired()
? MetisFieldRequired.NOTALLOWED
: MetisFieldRequired.MUSTEXIST;
case DIVIDEND:
return !myAccount.isTaxFree()
&& (myYear.isTaxCreditRequired() || myAccount.isForeign())
? MetisFieldRequired.MUSTEXIST
: MetisFieldRequired.NOTALLOWED;
case TRANSFER:
return myAccount instanceof MoneyWiseSecurityHolding
&& ((MoneyWiseSecurityHolding) myAccount).getSecurity().isSecurityClass(MoneyWiseSecurityClass.LIFEBOND)
? MetisFieldRequired.MUSTEXIST
: MetisFieldRequired.NOTALLOWED;
default:
return MetisFieldRequired.NOTALLOWED;
}
}
/**
* Determine if a Withheld amount is required.
* @param pClass the category class
* @return the status
*/
private static MetisFieldRequired isWithheldAmountRequired(final MoneyWiseTransCategoryClass pClass) {
/* Withheld is only available for salary and interest */
switch (pClass) {
case TAXEDINCOME:
case INTEREST:
return MetisFieldRequired.CANEXIST;
default:
return MetisFieldRequired.NOTALLOWED;
}
}
/**
* Determine if an AccountDeltaUnits infoSet class is required.
* @param pClass the category class
* @return the status
*/
private MetisFieldRequired isAccountUnitsDeltaRequired(final MoneyWiseTransCategoryClass pClass) {
final MoneyWiseTransaction myTrans = getOwner();
final MoneyWiseTransAsset myAccount = myTrans.getAccount();
final MoneyWiseTransAsset myPartner = myTrans.getPartner();
final MoneyWiseAssetDirection myDir = myTrans.getDirection();
/* Account must be security holding */
if (!(myAccount instanceof MoneyWiseSecurityHolding)) {
return MetisFieldRequired.NOTALLOWED;
}
/* Account cannot be autoUnits */
final MoneyWiseSecurityHolding myHolding = (MoneyWiseSecurityHolding) myAccount;
if (myHolding.getSecurity().getCategoryClass().isAutoUnits()) {
return MetisFieldRequired.NOTALLOWED;
}
/* Handle different transaction types */
switch (pClass) {
case TRANSFER:
case STOCKDEMERGER:
return MetisFieldRequired.CANEXIST;
case UNITSADJUST:
case STOCKSPLIT:
case INHERITED:
return MetisFieldRequired.MUSTEXIST;
case DIVIDEND:
return myAccount.equals(myPartner)
? MetisFieldRequired.CANEXIST
: MetisFieldRequired.NOTALLOWED;
case STOCKRIGHTSISSUE:
return myDir.isFrom()
? MetisFieldRequired.MUSTEXIST
: MetisFieldRequired.NOTALLOWED;
default:
return MetisFieldRequired.NOTALLOWED;
}
}
/**
* Determine if an PartnerDeltaUnits infoSet class is required.
* @param pClass the category class
* @return the status
*/
private MetisFieldRequired isPartnerUnitsDeltaRequired(final MoneyWiseTransCategoryClass pClass) {
final MoneyWiseTransaction myTrans = getOwner();
final MoneyWiseTransAsset myPartner = myTrans.getPartner();
final MoneyWiseAssetDirection myDir = myTrans.getDirection();
/* Partner must be security holding */
if (!(myPartner instanceof MoneyWiseSecurityHolding)) {
return MetisFieldRequired.NOTALLOWED;
}
/* Partner cannot be autoUnits */
final MoneyWiseSecurityHolding myHolding = (MoneyWiseSecurityHolding) myPartner;
if (myHolding.getSecurity().getCategoryClass().isAutoUnits()) {
return MetisFieldRequired.NOTALLOWED;
}
/* Handle different transaction types */
switch (pClass) {
case TRANSFER:
return MetisFieldRequired.CANEXIST;
case STOCKDEMERGER:
case SECURITYREPLACE:
case STOCKTAKEOVER:
return MetisFieldRequired.MUSTEXIST;
case STOCKRIGHTSISSUE:
return myDir.isTo()
? MetisFieldRequired.MUSTEXIST
: MetisFieldRequired.NOTALLOWED;
default:
return MetisFieldRequired.NOTALLOWED;
}
}
/**
* Determine if a Dilution infoSet class is required.
* @param pClass the category class
* @return the status
*/
private static MetisFieldRequired isDilutionClassRequired(final MoneyWiseTransCategoryClass pClass) {
/* Dilution is only required for stock split/deMerger */
switch (pClass) {
case STOCKSPLIT:
case UNITSADJUST:
return MetisFieldRequired.CANEXIST;
case STOCKDEMERGER:
return MetisFieldRequired.MUSTEXIST;
default:
return MetisFieldRequired.NOTALLOWED;
}
}
/**
* Determine if a ReturnedCash Account class is required.
* @param pClass the category class
* @return the status
*/
private static MetisFieldRequired isReturnedCashAccountRequired(final MoneyWiseTransCategoryClass pClass) {
/* Returned Cash is possible only for StockTakeOver */
return pClass == MoneyWiseTransCategoryClass.STOCKTAKEOVER
? MetisFieldRequired.CANEXIST
: MetisFieldRequired.NOTALLOWED;
}
/**
* Determine if a ReturnedCash value is required.
* @param pTransaction the transaction
* @return the status
*/
private static MetisFieldRequired isReturnedCashRequired(final MoneyWiseTransaction pTransaction) {
/* Returned Cash Amount is possible only if ReturnedCashAccount exists */
return pTransaction.getReturnedCashAccount() != null
? MetisFieldRequired.MUSTEXIST
: MetisFieldRequired.NOTALLOWED;
}
/**
* Determine if a PartnerAmount infoSet class is required.
* @param pCategory the category
* @return the status
*/
private MetisFieldRequired isPartnerAmountClassRequired(final MoneyWiseTransCategoryClass pCategory) {
final MoneyWiseTransaction myTrans = getOwner();
final MoneyWiseTransAsset myAccount = myTrans.getAccount();
final MoneyWiseTransAsset myPartner = myTrans.getPartner();
/* If the transaction requires null amount, then partner amount must also be null */
if (pCategory.needsNullAmount()) {
return MetisFieldRequired.NOTALLOWED;
}
/* If Partner currency is null or the same as Account then Partner amount is not allowed */
final MoneyWiseCurrency myCurrency = myAccount.getAssetCurrency();
final MoneyWiseCurrency myPartnerCurrency = myPartner == null ? null : myPartner.getAssetCurrency();
if (myCurrency == null || myPartnerCurrency == null) {
return MetisFieldRequired.NOTALLOWED;
}
return MetisDataDifference.isEqual(myCurrency, myPartnerCurrency)
? MetisFieldRequired.NOTALLOWED
: MetisFieldRequired.MUSTEXIST;
}
/**
* Determine if an QualifyingYears infoSet class is required.
* @param pCategory the category
* @return the status
*/
private MetisFieldRequired isQualifyingYearsClassRequired(final MoneyWiseTransCategoryClass pCategory) {
final MoneyWiseTransaction myTrans = getOwner();
final MoneyWiseTransAsset myAccount = myTrans.getAccount();
return pCategory == MoneyWiseTransCategoryClass.TRANSFER
&& myAccount instanceof MoneyWiseSecurityHolding
&& ((MoneyWiseSecurityHolding) myAccount).getSecurity().isSecurityClass(MoneyWiseSecurityClass.LIFEBOND)
? MetisFieldRequired.MUSTEXIST
: MetisFieldRequired.NOTALLOWED;
}
/**
* Determine if an XchangeRate infoSet class is required.
* @param pCategory the category
* @return the status
*/
private MetisFieldRequired isXchangeRateClassRequired(final MoneyWiseTransCategoryClass pCategory) {
final MoneyWiseTransaction myTrans = getOwner();
final MoneyWiseDataSet myData = myTrans.getDataSet();
final MoneyWiseTransAsset myAccount = myTrans.getAccount();
return pCategory.isDividend()
&& !myAccount.getAssetCurrency().equals(myData.getReportingCurrency())
? MetisFieldRequired.MUSTEXIST
: MetisFieldRequired.NOTALLOWED;
}
/**
* Determine if a price infoSet class is required.
* @param pCategory the category
* @return the status
*/
private static MetisFieldRequired isPriceClassRequired(final MoneyWiseTransCategoryClass pCategory) {
/* Only allowed for stockSplit and UnitsAdjust */
switch (pCategory) {
case STOCKSPLIT:
case UNITSADJUST:
return MetisFieldRequired.CANEXIST;
default:
return MetisFieldRequired.NOTALLOWED;
}
}
/**
* Determine if a Commission infoSet class is required.
* @param pCategory the category
* @return the status
*/
private static MetisFieldRequired isCommissionClassRequired(final MoneyWiseTransCategoryClass pCategory) {
/* Don't allow yet */
return MetisFieldRequired.NOTALLOWED;
/* Account or Partner must be security holding
if (!(pAccount instanceof SecurityHolding)
&& !(pPartner instanceof SecurityHolding)) {
return MetisFieldRequired.NOTALLOWED;
}
switch (pCategory) {
case TRANSFER:
return MetisFieldRequired.CANEXIST;
case DIVIDEND:
return MetisDataDifference.isEqual(pAccount, pPartner)
? MetisFieldRequired.CANEXIST
: MetisFieldRequired.NOTALLOWED;
default:
return MetisFieldRequired.NOTALLOWED;
} */
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\core\base\GordianDataConverter.java | GordianKnot Security Framework | 369 |
| net\sourceforge\joceanus\oceanus\convert\OceanusDataConverter.java | Oceanus Java Core Utilities | 369 |
throw new GordianDataException(e.getMessage(), e);
}
}
/**
* parse a long from a byte array.
* @param pBytes the eight byte array holding the long
* @return the long value
*/
public static long byteArrayToLong(final byte[] pBytes) {
/* Loop through the bytes */
long myValue = 0;
for (int i = 0; i < Long.BYTES; i++) {
/* Access the next byte as an unsigned integer */
int myByte = pBytes[i];
myByte &= BYTE_MASK;
/* Add in to value */
myValue <<= BYTE_SHIFT;
myValue += myByte;
}
/* Return the value */
return myValue;
}
/**
* build a byte array from a long.
* @param pValue the long value to convert
* @return the byte array
*/
public static byte[] longToByteArray(final long pValue) {
/* Loop through the bytes */
long myValue = pValue;
final byte[] myBytes = new byte[Long.BYTES];
for (int i = Long.BYTES; i > 0; i--) {
/* Store the next byte */
final byte myByte = (byte) (myValue & BYTE_MASK);
myBytes[i - 1] = myByte;
/* Adjust value */
myValue >>= BYTE_SHIFT;
}
/* Return the value */
return myBytes;
}
/**
* parse an integer from a byte array.
* @param pBytes the four byte array holding the integer
* @return the integer value
*/
public static int byteArrayToInteger(final byte[] pBytes) {
/* Loop through the bytes */
int myValue = 0;
for (int i = 0; i < Integer.BYTES; i++) {
/* Access the next byte as an unsigned integer */
int myByte = pBytes[i];
myByte &= BYTE_MASK;
/* Add in to value */
myValue <<= BYTE_SHIFT;
myValue += myByte;
}
/* Return the value */
return myValue;
}
/**
* build a byte array from an integer.
* @param pValue the integer value to convert
* @return the byte array
*/
public static byte[] integerToByteArray(final int pValue) {
/* Loop through the bytes */
final byte[] myBytes = new byte[Integer.BYTES];
int myValue = pValue;
for (int i = Integer.BYTES; i > 0; i--) {
/* Store the next byte */
final byte myByte = (byte) (myValue & BYTE_MASK);
myBytes[i - 1] = myByte;
/* Adjust value */
myValue >>= BYTE_SHIFT;
}
/* Return the value */
return myBytes;
}
/**
* parse a short from a byte array.
* @param pBytes the four byte array holding the integer
* @return the short value
*/
public static short byteArrayToShort(final byte[] pBytes) {
/* Loop through the bytes */
short myValue = 0;
for (int i = 0; i < Short.BYTES; i++) {
/* Access the next byte as an unsigned integer */
short myByte = pBytes[i];
myByte &= BYTE_MASK;
/* Add in to value */
myValue <<= BYTE_SHIFT;
myValue += myByte;
}
/* Return the value */
return myValue;
}
/**
* build a byte array from a short.
* @param pValue the short value to convert
* @return the byte array
*/
public static byte[] shortToByteArray(final short pValue) {
/* Loop through the bytes */
final byte[] myBytes = new byte[Short.BYTES];
int myValue = pValue;
for (int i = Short.BYTES; i > 0; i--) {
/* Store the next byte */
final byte myByte = (byte) (myValue & BYTE_MASK);
myBytes[i - 1] = myByte;
/* Adjust value */
myValue >>= BYTE_SHIFT;
}
/* Return the value */
return myBytes;
}
/**
* get Bytes from String.
* @param pInput the bytes to obtain the string from
* @return the bytes representing the bytes
*/
public static String byteArrayToString(final byte[] pInput) {
return new String(pInput, StandardCharsets.UTF_8);
}
/**
* get Bytes from String.
* @param pInput the string to obtain the bytes from
* @return the bytes representing the string
*/
public static byte[] stringToByteArray(final String pInput) {
return pInput.getBytes(StandardCharsets.UTF_8);
}
/**
* Convert a byte array to a Base64 string.
* @param pBytes the byte array (not null)
* @return the translated Base64 string (not null)
*/
public static String byteArrayToBase64(final byte[] pBytes) {
/* Determine input length and allocate output buffer */
final int myLen = pBytes.length;
final StringBuilder myBuilder = new StringBuilder(myLen << 1);
final byte[] myTriplet = new byte[BASE64_TRIPLE];
/* Loop through the input bytes */
int myIn = 0;
while (myIn < myLen) {
/* Access input triplet */
myTriplet[0] = pBytes[myIn++];
myTriplet[1] = myIn < myLen
? pBytes[myIn++]
: 0;
myTriplet[2] = myIn < myLen
? pBytes[myIn++]
: 0;
/* Convert to base64 */
myBuilder.append(BASE64_ENCODE[(myTriplet[0] >> BASE64_SHIFT1)
& BASE64_MASK]);
myBuilder.append(BASE64_ENCODE[((myTriplet[0] << BASE64_SHIFT2) | ((myTriplet[1] & BYTE_MASK) >> BASE64_SHIFT2))
& BASE64_MASK]);
myBuilder.append(BASE64_ENCODE[((myTriplet[1] << BASE64_SHIFT1) | ((myTriplet[2] & BYTE_MASK) >> BASE64_SHIFT3))
& BASE64_MASK]);
myBuilder.append(BASE64_ENCODE[myTriplet[2]
& BASE64_MASK]);
}
/* Handle short input */
int myXtra = myLen
% myTriplet.length;
if (myXtra > 0) {
/* Determine padding length */
myXtra = myTriplet.length
- myXtra;
/* Remove redundant characters */
myBuilder.setLength(myBuilder.length()
- myXtra);
/* Replace with padding character */
while (myXtra-- > 0) {
myBuilder.append(BASE64_PAD);
}
}
/* Convert chars to string */
return myBuilder.toString();
}
/**
* Convert a Base64 string into a byte array.
* @param pBase64 the Base64 string (not null)
* @return the byte array (not null)
*/
public static byte[] base64ToByteArray(final String pBase64) {
/* Access input as chars */
final char[] myBase64 = pBase64.toCharArray();
final int myLen = myBase64.length;
/* Determine number of padding bytes */
int myNumPadding = 0;
if (myBase64[myLen - 1] == BASE64_PAD) {
myNumPadding++;
if (myBase64[myLen - 2] == BASE64_PAD) {
myNumPadding++;
}
}
/* Allocate the output buffer and index */
final int myOutLen = ((myLen * BASE64_TRIPLE) >> 2)
- myNumPadding;
final byte[] myOutput = new byte[myOutLen];
/* Loop through the base64 input */
int myIn = 0;
int myOut = 0;
while (myOut < myOutLen) {
/* Build first byte */
final int c0 = BASE64_DECODE[myBase64[myIn++]];
final int c1 = BASE64_DECODE[myBase64[myIn++]];
myOutput[myOut++] = (byte) (((c0 << BASE64_SHIFT1) | (c1 >> BASE64_SHIFT2)) & BYTE_MASK);
/* Build second byte */
if (myOut < myOutLen) {
final int c2 = BASE64_DECODE[myBase64[myIn++]];
myOutput[myOut++] = (byte) (((c1 << BASE64_SHIFT2) | (c2 >> BASE64_SHIFT1)) & BYTE_MASK);
/* Build third byte */
if (myOut < myOutLen) {
final int c3 = BASE64_DECODE[myBase64[myIn++]];
myOutput[myOut++] = (byte) (((c2 << BASE64_SHIFT3) | c3) & BYTE_MASK);
}
}
}
return myOutput;
}
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\dialog\MoneyWiseXTransactionDialog.java | MoneyWise Personal Finance - Core | 694 |
| net\sourceforge\joceanus\moneywise\lethe\ui\dialog\MoneyWiseTransactionDialog.java | MoneyWise Personal Finance - Core | 722 |
buildAssetMenu(pMenu, getDataList(MoneyWiseBasicDataType.PAYEE, MoneyWisePayeeList.class), false, myTrans);
}
/**
* Build the asset menu for an item.
* @param <T> the Asset type
* @param pMenu the menu
* @param pIsAccount is this item the account rather than partner
* @param pList the asset list
* @param pTrans the transaction to build for
*/
private static <T extends MoneyWiseAssetBase> void buildAssetMenu(final TethysUIScrollMenu<MoneyWiseTransAsset> pMenu,
final MoneyWiseAssetBaseList<T> pList,
final boolean pIsAccount,
final MoneyWiseTransaction pTrans) {
/* Record active item */
final MoneyWiseTransAsset myAccount = pTrans.getAccount();
final MoneyWiseTransCategory myCategory = pTrans.getCategory();
final MoneyWiseDataValidatorTrans myValidator = pTrans.getList().getValidator();
final MoneyWiseTransAsset myCurr = pIsAccount
? myAccount
: pTrans.getPartner();
TethysUIScrollItem<MoneyWiseTransAsset> myActive = null;
TethysUIScrollSubMenu<MoneyWiseTransAsset> myMenu = null;
/* Loop through the available values */
final Iterator<T> myIterator = pList.iterator();
while (myIterator.hasNext()) {
final T myAsset = myIterator.next();
/* Only process non-deleted/non-closed items */
boolean bIgnore = myAsset.isDeleted() || myAsset.isClosed();
/* Check whether the asset is allowable for the owner */
bIgnore |= !(pIsAccount
? myValidator.isValidAccount(myAsset)
: myValidator.isValidPartner(myAccount, myCategory, myAsset));
if (bIgnore) {
continue;
}
/* If this the first item */
if (myMenu == null) {
/* Create a new subMenu and add it to the popUp */
myMenu = pMenu.addSubMenu(pList.getItemType().getItemName());
}
/* Create a new MenuItem and add it to the popUp */
final TethysUIScrollItem<MoneyWiseTransAsset> myItem = myMenu.getSubMenu().addItem(myAsset);
/* If this is the active category */
if (myAsset.equals(myCurr)) {
/* Record it */
myActive = myItem;
}
}
/* Ensure active item is visible */
if (myActive != null) {
myActive.scrollToItem();
}
}
/**
* Build the holding asset menu for an item.
* @param pMenu the menu
* @param pIsAccount is this item the account rather than partner
* @param pTrans the transaction to build for
*/
private static void buildHoldingMenu(final TethysUIScrollMenu<MoneyWiseTransAsset> pMenu,
final boolean pIsAccount,
final MoneyWiseTransaction pTrans) {
/* Record active item */
final MoneyWiseTransAsset myAccount = pTrans.getAccount();
final MoneyWiseTransCategory myCategory = pTrans.getCategory();
final MoneyWiseDataValidatorTrans myValidator = pTrans.getList().getValidator();
final MoneyWiseTransAsset myCurr = pIsAccount
? myAccount
: pTrans.getPartner();
TethysUIScrollItem<MoneyWiseTransAsset> myActive = null;
TethysUIScrollSubMenu<MoneyWiseTransAsset> myMenu = null;
/* Access Portfolios and Holdings Map */
final MoneyWiseDataSet myData = pTrans.getDataSet();
final MoneyWisePortfolioList myPortfolios = myData.getPortfolios();
final MoneyWiseSecurityHoldingMap myMap = myPortfolios.getSecurityHoldingsMap();
/* Loop through the Portfolios */
final Iterator<MoneyWisePortfolio> myPortIterator = myPortfolios.iterator();
while (myPortIterator.hasNext()) {
final MoneyWisePortfolio myPortfolio = myPortIterator.next();
TethysUIScrollSubMenu<MoneyWiseTransAsset> myCoreMenu = null;
/* Ignore deleted or closed */
if (myPortfolio.isDeleted()
|| Boolean.TRUE.equals(myPortfolio.isClosed())) {
continue;
}
/* Look for existing and new holdings */
final Iterator<MoneyWiseSecurityHolding> myExistIterator = myMap.existingIterator(myPortfolio);
final Iterator<MoneyWiseSecurityHolding> myNewIterator = myMap.newIterator(myPortfolio);
if ((myExistIterator != null) || (myNewIterator != null)) {
/* If there are existing elements */
if (myExistIterator != null) {
/* Loop through them */
while (myExistIterator.hasNext()) {
final MoneyWiseSecurityHolding myHolding = myExistIterator.next();
final MoneyWiseSecurity mySecurity = myHolding.getSecurity();
/* Check whether the asset is allowable for the owner */
final boolean bIgnore = !(pIsAccount
? myValidator.isValidAccount(myHolding)
: myValidator.isValidPartner(myAccount, myCategory, myHolding));
if (bIgnore) {
continue;
}
/* Ensure that hierarchy is created */
if (myMenu == null) {
/* Create a new JMenu and add it to the popUp */
myMenu = pMenu.addSubMenu(MoneyWiseAssetType.SECURITYHOLDING.toString());
}
if (myCoreMenu == null) {
/* Create a new Menu and add it to the popUp */
myCoreMenu = myMenu.getSubMenu().addSubMenu(myPortfolio.getName());
}
/* Add the item to the menu */
final TethysUIScrollItem<MoneyWiseTransAsset> myItem = myCoreMenu.getSubMenu().addItem(myHolding, mySecurity.getName());
/* If this is the active holding */
if (mySecurity.equals(myCurr)) {
/* Record it */
myActive = myItem;
}
}
}
/* If there are new elements */
if (myNewIterator != null) {
/* Loop through them */
TethysUIScrollSubMenu<MoneyWiseTransAsset> mySubMenu = null;
while (myNewIterator.hasNext()) {
final MoneyWiseSecurityHolding myHolding = myNewIterator.next();
final MoneyWiseSecurity mySecurity = myHolding.getSecurity();
/* Check whether the asset is allowable for the owner */
final boolean bIgnore = !(pIsAccount
? myValidator.isValidAccount(myHolding)
: myValidator.isValidPartner(myAccount, myCategory, myHolding));
if (bIgnore) {
continue;
}
/* Ensure that hierarchy is created */
if (myMenu == null) {
/* Create a new subMenu and add it to the popUp */
myMenu = pMenu.addSubMenu(MoneyWiseAssetType.SECURITYHOLDING.toString());
}
if (myCoreMenu == null) {
/* Create a new subMenu and add it to the popUp */
myCoreMenu = myMenu.getSubMenu().addSubMenu(myPortfolio.getName());
}
if (mySubMenu == null) {
/* Create a new subMenu */
mySubMenu = myCoreMenu.getSubMenu().addSubMenu(MoneyWiseSecurityHolding.SECURITYHOLDING_NEW);
}
/* Add the item to the menu */
mySubMenu.getSubMenu().addItem(myHolding, mySecurity.getName());
}
}
}
}
/* Ensure active item is visible */
if (myActive != null) {
myActive.scrollToItem();
}
}
/**
* Build the category menu for an item.
* @param pMenu the menu
* @param pEvent the event to build for
*/
public void buildCategoryMenu(final TethysUIScrollMenu<MoneyWiseTransCategory> pMenu,
final MoneyWiseXAnalysisEvent pEvent) { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\dialog\MoneyWiseXTransactionDialog.java | MoneyWise Personal Finance - Core | 501 |
| net\sourceforge\joceanus\moneywise\lethe\ui\dialog\MoneyWiseTransactionDialog.java | MoneyWise Personal Finance - Core | 531 |
final MoneyWiseTransaction myTrans = getItem().getTransaction();
final MoneyWiseValidateTransaction myBuilder = (MoneyWiseValidateTransaction) myTrans.getList().getValidator();
/* Process updates */
if (MoneyWiseBasicResource.MONEYWISEDATA_FIELD_DATE.equals(myField)) {
/* Update the Date */
myTrans.setDate(pUpdate.getValue(OceanusDate.class));
} else if (MoneyWiseBasicResource.TRANSACTION_AMOUNT.equals(myField)) {
/* Update the Amount */
myTrans.setAmount(pUpdate.getValue(OceanusMoney.class));
myBuilder.autoCorrect(myTrans);
} else if (MoneyWiseBasicResource.TRANSACTION_ACCOUNT.equals(myField)) {
/* Update the Account */
myTrans.setAccount(resolveAsset(pUpdate.getValue(MoneyWiseTransAsset.class)));
myBuilder.autoCorrect(myTrans);
} else if (MoneyWiseBasicResource.TRANSACTION_DIRECTION.equals(myField)) {
/* Update the Direction */
myTrans.switchDirection();
myBuilder.autoCorrect(myTrans);
} else if (MoneyWiseBasicResource.TRANSACTION_PARTNER.equals(myField)) {
/* Update the Partner */
myTrans.setPartner(resolveAsset(pUpdate.getValue(MoneyWiseTransAsset.class)));
myBuilder.autoCorrect(myTrans);
} else if (MoneyWiseBasicDataType.TRANSCATEGORY.equals(myField)) {
/* Update the Category */
myTrans.setCategory(pUpdate.getValue(MoneyWiseTransCategory.class));
myBuilder.autoCorrect(myTrans);
} else if (MoneyWiseBasicResource.TRANSACTION_RECONCILED.equals(myField)) {
/* Update the Reconciled indication */
myTrans.setReconciled(pUpdate.getValue(Boolean.class));
} else if (MoneyWiseTransInfoClass.COMMENTS.equals(myField)) {
/* Update the Comments */
myTrans.setComments(pUpdate.getValue(String.class));
} else if (MoneyWiseTransInfoClass.REFERENCE.equals(myField)) {
/* Update the Reference */
myTrans.setReference(pUpdate.getValue(String.class));
} else if (MoneyWiseTransInfoClass.TRANSTAG.equals(myField)) {
/* Update the Tag indication */
myTrans.setTransactionTags(pUpdate.getValue(List.class));
} else if (MoneyWiseTransInfoClass.PARTNERAMOUNT.equals(myField)) {
/* Update the PartnerAmount */
myTrans.setPartnerAmount(pUpdate.getValue(OceanusMoney.class));
} else if (MoneyWiseTransInfoClass.XCHANGERATE.equals(myField)) {
/* Update the ExchangeRate */
myTrans.setExchangeRate(pUpdate.getValue(OceanusRatio.class));
} else if (MoneyWiseTransInfoClass.ACCOUNTDELTAUNITS.equals(myField)) {
/* Update the AccountDeltaUnits */
myTrans.setAccountDeltaUnits(pUpdate.getValue(OceanusUnits.class));
} else if (MoneyWiseTransInfoClass.PARTNERDELTAUNITS.equals(myField)) {
/* Update the PartnerDeltaUnits */
myTrans.setPartnerDeltaUnits(pUpdate.getValue(OceanusUnits.class));
} else if (MoneyWiseTransInfoClass.PRICE.equals(myField)) {
/* Update the Price */
myTrans.setPrice(pUpdate.getValue(OceanusPrice.class));
} else if (MoneyWiseTransInfoClass.COMMISSION.equals(myField)) {
/* Update the Commission */
myTrans.setCommission(pUpdate.getValue(OceanusMoney.class));
} else if (MoneyWiseTransInfoClass.DILUTION.equals(myField)) {
/* Update the Dilution */
myTrans.setDilution(pUpdate.getValue(OceanusRatio.class));
} else if (MoneyWiseTransInfoClass.QUALIFYYEARS.equals(myField)) {
/* Update the QualifyYears */
myTrans.setYears(pUpdate.getValue(Integer.class));
} else if (MoneyWiseTransInfoClass.RETURNEDCASHACCOUNT.equals(myField)) {
/* Update the ReturnedCashAccount */
myTrans.setReturnedCashAccount(pUpdate.getValue(MoneyWiseTransAsset.class));
myBuilder.autoCorrect(myTrans);
} else if (MoneyWiseTransInfoClass.RETURNEDCASH.equals(myField)) {
/* Update the ReturnedCash */
myTrans.setReturnedCash(pUpdate.getValue(OceanusMoney.class));
} else if (MoneyWiseTransInfoClass.TAXCREDIT.equals(myField)) {
/* Update the TaxCredit */
myTrans.setTaxCredit(pUpdate.getValue(OceanusMoney.class));
} else if (MoneyWiseTransInfoClass.EMPLOYEENATINS.equals(myField)) {
/* Update the EmployeeNatIns */
myTrans.setEmployeeNatIns(pUpdate.getValue(OceanusMoney.class));
} else if (MoneyWiseTransInfoClass.EMPLOYERNATINS.equals(myField)) {
/* Update the EmployerNayIns */
myTrans.setEmployerNatIns(pUpdate.getValue(OceanusMoney.class));
} else if (MoneyWiseTransInfoClass.DEEMEDBENEFIT.equals(myField)) {
/* Update the Benefit */
myTrans.setDeemedBenefit(pUpdate.getValue(OceanusMoney.class));
} else if (MoneyWiseTransInfoClass.WITHHELD.equals(myField)) {
/* Update the Withheld */
myTrans.setWithheld(pUpdate.getValue(OceanusMoney.class));
}
}
@Override
protected void declareGoToItems(final boolean pUpdates) {
/* Access the item */
final MoneyWiseXAnalysisEvent myItem = getItem(); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\sheets\MoneyWiseReader.java | MoneyWise Personal Finance - Core | 43 |
| net\sourceforge\joceanus\moneywise\sheets\MoneyWiseWriter.java | MoneyWise Personal Finance - Core | 40 |
super(pFactory, pReport, pPasswordMgr);
}
/**
* Register sheets.
*/
@Override
protected void registerSheets() {
/* Loop through the static types */
for (MoneyWiseStaticDataType myType : MoneyWiseStaticDataType.values()) {
/* Create the sheet */
addSheet(newSheet(myType));
}
/* Loop through the basic types */
for (MoneyWiseBasicDataType myType : MoneyWiseBasicDataType.values()) {
/* Create the sheet */
addSheet(newSheet(myType));
}
}
/**
* Create new sheet of required type.
* @param pDataType the data type
* @return the new sheet
*/
private PrometheusSheetDataItem<?> newSheet(final MoneyWiseStaticDataType pDataType) {
/* Switch on data Type */
switch (pDataType) {
case DEPOSITTYPE:
return new MoneyWiseSheetDepositCategoryType(this);
case CASHTYPE:
return new MoneyWiseSheetCashCategoryType(this);
case LOANTYPE:
return new MoneyWiseSheetLoanCategoryType(this);
case PORTFOLIOTYPE:
return new MoneyWiseSheetPortfolioType(this);
case PAYEETYPE:
return new MoneyWiseSheetPayeeType(this);
case SECURITYTYPE:
return new MoneyWiseSheetSecurityType(this);
case TRANSTYPE:
return new MoneyWiseSheetTransCategoryType(this);
case ACCOUNTINFOTYPE:
return new MoneyWiseSheetAccountInfoType(this);
case TRANSINFOTYPE:
return new MoneyWiseSheetTransInfoType(this);
case CURRENCY:
return new MoneyWiseSheetCurrency(this);
case TAXBASIS:
return new MoneyWiseSheetTaxBasis(this);
default:
throw new IllegalArgumentException(pDataType.toString());
}
}
/**
* Create new sheet of required type.
* @param pDataType the data type
* @return the new sheet
*/
private PrometheusSheetDataItem<?> newSheet(final MoneyWiseBasicDataType pDataType) {
/* Switch on data Type */
switch (pDataType) {
case TRANSTAG:
return new MoneyWiseSheetTransTag(this);
case REGION:
return new MoneyWiseSheetRegion(this);
case DEPOSITCATEGORY:
return new MoneyWiseSheetDepositCategory(this);
case CASHCATEGORY:
return new MoneyWiseSheetCashCategory(this);
case LOANCATEGORY:
return new MoneyWiseSheetLoanCategory(this);
case TRANSCATEGORY:
return new MoneyWiseSheetTransCategory(this);
case EXCHANGERATE:
return new MoneyWiseSheetExchangeRate(this);
case PAYEE:
return new MoneyWiseSheetPayee(this);
case PAYEEINFO:
return new MoneyWiseSheetPayeeInfo(this);
case SECURITY:
return new MoneyWiseSheetSecurity(this);
case SECURITYPRICE:
return new MoneyWiseSheetSecurityPrice(this);
case SECURITYINFO:
return new MoneyWiseSheetSecurityInfo(this);
case DEPOSIT:
return new MoneyWiseSheetDeposit(this);
case DEPOSITRATE:
return new MoneyWiseSheetDepositRate(this);
case DEPOSITINFO:
return new MoneyWiseSheetDepositInfo(this);
case CASH:
return new MoneyWiseSheetCash(this);
case CASHINFO:
return new MoneyWiseSheetCashInfo(this);
case LOAN:
return new MoneyWiseSheetLoan(this);
case LOANINFO:
return new MoneyWiseSheetLoanInfo(this);
case PORTFOLIO:
return new MoneyWiseSheetPortfolio(this);
case PORTFOLIOINFO:
return new MoneyWiseSheetPortfolioInfo(this);
case TRANSACTION:
return new MoneyWiseSheetTransaction(this);
case TRANSACTIONINFO:
return new MoneyWiseSheetTransInfo(this);
default:
throw new IllegalArgumentException(pDataType.toString());
}
}
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\panel\MoneyWiseXEventTable.java | MoneyWise Personal Finance - Core | 875 |
| net\sourceforge\joceanus\moneywise\lethe\ui\panel\MoneyWiseTransactionTable.java | MoneyWise Personal Finance - Core | 880 |
final TethysUITableManager<MetisDataFieldId, MoneyWiseXAnalysisEvent> myTable = getTable();
hideAllColumns();
/* Switch on column set */
switch (pSet) {
case BALANCE:
myTable.getColumn(MoneyWiseTransInfoClass.COMMENTS).setVisible(true);
myTable.getColumn(MoneyWiseTransDataId.DEBIT).setVisible(true);
myTable.getColumn(MoneyWiseTransDataId.CREDIT).setVisible(true);
myTable.getColumn(MoneyWiseTransDataId.BALANCE).setVisible(true);
break;
case STANDARD:
myTable.getColumn(MoneyWiseTransInfoClass.COMMENTS).setVisible(true);
myTable.getColumn(MoneyWiseBasicResource.TRANSACTION_AMOUNT).setVisible(true);
myTable.getColumn(MoneyWiseTransInfoClass.TRANSTAG).setVisible(true);
myTable.getColumn(MoneyWiseTransInfoClass.REFERENCE).setVisible(true);
myTable.getColumn(MoneyWiseTransInfoClass.PARTNERAMOUNT).setVisible(true);
break;
case SALARY:
myTable.getColumn(MoneyWiseBasicResource.TRANSACTION_AMOUNT).setVisible(true);
myTable.getColumn(MoneyWiseTransInfoClass.TAXCREDIT).setVisible(true);
myTable.getColumn(MoneyWiseTransInfoClass.EMPLOYEENATINS).setVisible(true);
myTable.getColumn(MoneyWiseTransInfoClass.EMPLOYERNATINS).setVisible(true);
myTable.getColumn(MoneyWiseTransInfoClass.DEEMEDBENEFIT).setVisible(true);
myTable.getColumn(MoneyWiseTransInfoClass.WITHHELD).setVisible(true);
break;
case INTEREST:
myTable.getColumn(MoneyWiseBasicResource.TRANSACTION_AMOUNT).setVisible(true);
myTable.getColumn(MoneyWiseTransInfoClass.TAXCREDIT).setVisible(true);
myTable.getColumn(MoneyWiseTransInfoClass.WITHHELD).setVisible(true);
break;
case DIVIDEND:
myTable.getColumn(MoneyWiseBasicResource.TRANSACTION_AMOUNT).setVisible(true);
myTable.getColumn(MoneyWiseTransInfoClass.TAXCREDIT).setVisible(true);
myTable.getColumn(MoneyWiseTransInfoClass.ACCOUNTDELTAUNITS).setVisible(true);
break;
case SECURITY:
myTable.getColumn(MoneyWiseBasicResource.TRANSACTION_AMOUNT).setVisible(true);
myTable.getColumn(MoneyWiseTransInfoClass.ACCOUNTDELTAUNITS).setVisible(true);
myTable.getColumn(MoneyWiseTransInfoClass.PARTNERDELTAUNITS).setVisible(true);
myTable.getColumn(MoneyWiseTransInfoClass.DILUTION).setVisible(true);
myTable.getColumn(MoneyWiseTransInfoClass.RETURNEDCASHACCOUNT).setVisible(true);
myTable.getColumn(MoneyWiseTransInfoClass.RETURNEDCASH).setVisible(true); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseRegion.java | MoneyWise Personal Finance - Core | 119 |
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseTransTag.java | MoneyWise Personal Finance - Core | 119 |
public MoneyWiseRegion(final MoneyWiseRegionList pList) {
super(pList, 0);
setNextDataKeySet();
}
@Override
public MetisFieldSetDef getDataFieldSet() {
return FIELD_DEFS;
}
@Override
public String formatObject(final OceanusDataFormatter pFormatter) {
return toString();
}
@Override
public String toString() {
return getName();
}
@Override
public boolean includeXmlField(final MetisDataFieldId pField) {
/* Determine whether fields should be included */
if (PrometheusDataResource.DATAITEM_FIELD_NAME.equals(pField)) {
return true;
}
if (PrometheusDataResource.DATAITEM_FIELD_DESC.equals(pField)) {
return getDesc() != null;
}
/* Pass call on */
return super.includeXmlField(pField);
}
@Override
public String getName() {
return getValues().getValue(PrometheusDataResource.DATAITEM_FIELD_NAME, String.class);
}
/**
* Obtain Encrypted name.
* @return the bytes
*/
public byte[] getNameBytes() {
return getValues().getEncryptedBytes(PrometheusDataResource.DATAITEM_FIELD_NAME);
}
/**
* Obtain Encrypted Name Field.
* @return the Field
*/
private PrometheusEncryptedPair getNameField() {
return getValues().getEncryptedPair(PrometheusDataResource.DATAITEM_FIELD_NAME);
}
/**
* Obtain Description.
* @return the description
*/
public String getDesc() {
return getValues().getValue(PrometheusDataResource.DATAITEM_FIELD_DESC, String.class);
}
/**
* Obtain Encrypted description.
* @return the bytes
*/
public byte[] getDescBytes() {
return getValues().getEncryptedBytes(PrometheusDataResource.DATAITEM_FIELD_DESC);
}
/**
* Obtain Encrypted Description Field.
* @return the Field
*/
private PrometheusEncryptedPair getDescField() {
return getValues().getEncryptedPair(PrometheusDataResource.DATAITEM_FIELD_DESC);
}
/**
* Set name value.
* @param pValue the value
* @throws OceanusException on error
*/
private void setValueName(final String pValue) throws OceanusException {
setEncryptedValue(PrometheusDataResource.DATAITEM_FIELD_NAME, pValue);
}
/**
* Set name value.
* @param pBytes the value
* @throws OceanusException on error
*/
private void setValueName(final byte[] pBytes) throws OceanusException {
setEncryptedValue(PrometheusDataResource.DATAITEM_FIELD_NAME, pBytes, String.class);
}
/**
* Set name value.
* @param pValue the value
*/
private void setValueName(final PrometheusEncryptedPair pValue) {
getValues().setUncheckedValue(PrometheusDataResource.DATAITEM_FIELD_NAME, pValue);
}
/**
* Set description value.
* @param pValue the value
* @throws OceanusException on error
*/
private void setValueDesc(final String pValue) throws OceanusException {
setEncryptedValue(PrometheusDataResource.DATAITEM_FIELD_DESC, pValue);
}
/**
* Set description value.
* @param pBytes the value
* @throws OceanusException on error
*/
private void setValueDesc(final byte[] pBytes) throws OceanusException {
setEncryptedValue(PrometheusDataResource.DATAITEM_FIELD_DESC, pBytes, String.class);
}
/**
* Set description value.
* @param pValue the value
*/
private void setValueDesc(final PrometheusEncryptedPair pValue) {
getValues().setUncheckedValue(PrometheusDataResource.DATAITEM_FIELD_DESC, pValue);
}
@Override
public MoneyWiseDataSet getDataSet() {
return (MoneyWiseDataSet) super.getDataSet();
}
@Override
public MoneyWiseRegion getBase() { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\ext\digests\GordianBlake2Tree.java | GordianKnot Security Framework | 580 |
| net\sourceforge\joceanus\gordianknot\impl\ext\digests\GordianSkeinTree.java | GordianKnot Security Framework | 649 |
theDigest.doFinal(theResult, 0);
myLevel.setElementAt(Arrays.clone(theResult), myParentIndex);
return myParentIndex;
}
}
/**
* Simple Vector class.
* <p>This is a cut down version of the java Vector class to avoid use of synchronised.
*/
private static class SimpleVector {
/**
* The initial capacity.
*/
private static final int INITCAPACITY = 8;
/**
* The array buffer holding elements.
*/
private Object[] elementData;
/**
* The number of valid components in this {@code SimpleVector} object.
*/
private int elementCount;
/**
* Constructor.
*/
SimpleVector() {
elementData = new Object[INITCAPACITY];
}
/**
* Returns the number of components in this vector.
* @return the vector size
*/
int size() {
return elementCount;
}
/**
* Tests if this vector has no components.
* @return true/false
*/
boolean isEmpty() {
return elementCount == 0;
}
/**
* Returns the first component of the vector.
* @return the first component of the vector
* @throws NoSuchElementException if this vector is empty
*/
Object firstElement() {
if (elementCount == 0) {
throw new NoSuchElementException();
}
return elementData[0];
}
/**
* Returns the last component of the vector.
* @return the last component of the vector, i.e., the component at index
* <code>size() - 1</code>.
* @throws NoSuchElementException if this vector is empty
*/
Object lastElement() {
if (elementCount == 0) {
throw new NoSuchElementException();
}
return elementData[elementCount - 1];
}
/**
* Returns the component at the specified index.
*
* @param index an index into this vector
* @return the component at the specified index
* @throws ArrayIndexOutOfBoundsException if the index is out of range
* ({@code index < 0 || index >= size()})
*/
Object elementAt(final int index) {
if (index >= elementCount) {
throw new ArrayIndexOutOfBoundsException(index + " >= " + elementCount);
}
return elementData[index];
}
/**
* Sets the component at the specified {@code index} of this
* vector to be the specified object. The previous component at that
* position is discarded.
*
* <p>The index must be a value greater than or equal to {@code 0}
* and less than the current size of the vector.
*
* @param obj what the component is to be set to
* @param index the specified index
* @throws ArrayIndexOutOfBoundsException if the index is out of range
* ({@code index < 0 || index >= size()})
*/
void setElementAt(final Object obj,
final int index) {
if (index >= elementCount) {
throw new ArrayIndexOutOfBoundsException(index + " >= " + elementCount);
}
elementData[index] = obj;
}
/**
* Adds the specified component to the end of this vector,
* increasing its size by one. The capacity of this vector is
* increased if its size becomes greater than its capacity.
*
* @param obj the component to be added
*/
void addElement(final Object obj) {
if (elementCount == elementData.length) {
final Object[] newData = new Object[elementData.length << 1];
System.arraycopy(elementData, 0, newData, 0, elementCount);
elementData = newData;
}
elementData[elementCount++] = obj;
}
/**
* Removes all of the elements from this Vector. The Vector will
* be empty after this call returns (unless it throws an exception).
*/
void clear() {
for (int i = 0; i < elementCount; i++) {
elementData[i] = null;
}
elementCount = 0;
}
/**
* Returns an enumeration of the components of this vector.
* @return the enumeration
*/
Enumeration elements() {
return new Enumeration() {
private int count;
public boolean hasMoreElements() {
return count < elementCount;
}
public Object nextElement() {
if (count < elementCount) {
return elementData[count++];
}
throw new NoSuchElementException("Vector Enumeration");
}
};
}
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\coeus\data\fundingcircle\CoeusFundingCircleTotals.java | Coeus Core Peer2Peer Analysis | 289 |
| net\sourceforge\joceanus\coeus\data\zopa\CoeusZopaTotals.java | Coeus Core Peer2Peer Analysis | 272 |
final CoeusFundingCircleTotals myPrevious = (CoeusFundingCircleTotals) getPrevious();
if (Objects.equals(theAssetValue, myPrevious.getAssetValue())) {
theAssetValue = myPrevious.getAssetValue();
}
if (Objects.equals(theHolding, myPrevious.getHolding())) {
theHolding = myPrevious.getHolding();
}
if (Objects.equals(theLoanBook, myPrevious.getLoanBook())) {
theLoanBook = myPrevious.getLoanBook();
}
if (Objects.equals(theSourceValue, myPrevious.getSourceValue())) {
theSourceValue = myPrevious.getSourceValue();
}
if (Objects.equals(theInvested, myPrevious.getInvested())) {
theInvested = myPrevious.getInvested();
}
if (Objects.equals(theEarnings, myPrevious.getEarnings())) {
theEarnings = myPrevious.getEarnings();
}
if (Objects.equals(theTaxableEarnings, myPrevious.getTaxableEarnings())) {
theTaxableEarnings = myPrevious.getTaxableEarnings();
}
if (Objects.equals(theInterest, myPrevious.getInterest())) {
theInterest = myPrevious.getInterest();
}
if (Objects.equals(theNettInterest, myPrevious.getNettInterest())) {
theNettInterest = myPrevious.getNettInterest();
}
if (Objects.equals(theBadDebtInterest, myPrevious.getBadDebtInterest())) {
theBadDebtInterest = myPrevious.getBadDebtInterest();
}
if (Objects.equals(theBadDebtCapital, myPrevious.getBadDebtCapital())) {
theBadDebtCapital = myPrevious.getBadDebtCapital();
}
if (Objects.equals(theFees, myPrevious.getFees())) {
theFees = myPrevious.getFees();
}
if (Objects.equals(theCashBack, myPrevious.getCashBack())) {
theCashBack = myPrevious.getCashBack();
}
if (Objects.equals(theXferPayment, myPrevious.getXferPayment())) { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\dialog\MoneyWiseXTransactionDialog.java | MoneyWise Personal Finance - Core | 389 |
| net\sourceforge\joceanus\moneywise\lethe\ui\dialog\MoneyWiseTransactionDialog.java | MoneyWise Personal Finance - Core | 401 |
theFieldSet.setFieldEditable(MoneyWiseTransInfoClass.PARTNERAMOUNT, bEditField);
/* Determine whether the taxCredit field should be visible */
bEditField = isEditable && isEditableField(myTrans, MoneyWiseTransInfoClass.TAXCREDIT);
bShowField = bEditField || myTrans.getTaxCredit() != null;
theFieldSet.setFieldVisible(MoneyWiseTransInfoClass.TAXCREDIT, bShowField);
theFieldSet.setFieldEditable(MoneyWiseTransInfoClass.TAXCREDIT, bEditField);
/* Determine whether the EeNatIns field should be visible */
bEditField = isEditable && isEditableField(myTrans, MoneyWiseTransInfoClass.EMPLOYEENATINS);
bShowField = bEditField || myTrans.getEmployeeNatIns() != null;
theFieldSet.setFieldVisible(MoneyWiseTransInfoClass.EMPLOYEENATINS, bShowField);
theFieldSet.setFieldEditable(MoneyWiseTransInfoClass.EMPLOYEENATINS, bEditField);
/* Determine whether the ErnatIns field should be visible */
bEditField = isEditable && isEditableField(myTrans, MoneyWiseTransInfoClass.EMPLOYERNATINS);
bShowField = bEditField || myTrans.getEmployerNatIns() != null;
theFieldSet.setFieldVisible(MoneyWiseTransInfoClass.EMPLOYERNATINS, bShowField);
theFieldSet.setFieldEditable(MoneyWiseTransInfoClass.EMPLOYERNATINS, bEditField);
/* Determine whether the benefit field should be visible */
bEditField = isEditable && isEditableField(myTrans, MoneyWiseTransInfoClass.DEEMEDBENEFIT);
bShowField = bEditField || myTrans.getDeemedBenefit() != null;
theFieldSet.setFieldVisible(MoneyWiseTransInfoClass.DEEMEDBENEFIT, bShowField);
theFieldSet.setFieldEditable(MoneyWiseTransInfoClass.DEEMEDBENEFIT, bEditField);
/* Determine whether the donation field should be visible */
bEditField = isEditable && isEditableField(myTrans, MoneyWiseTransInfoClass.WITHHELD);
bShowField = bEditField || myTrans.getWithheld() != null;
theFieldSet.setFieldVisible(MoneyWiseTransInfoClass.WITHHELD, bShowField);
theFieldSet.setFieldEditable(MoneyWiseTransInfoClass.WITHHELD, bEditField);
/* Determine whether the account units field should be visible */
bEditField = isEditable && isEditableField(myTrans, MoneyWiseTransInfoClass.ACCOUNTDELTAUNITS);
bShowField = bEditField || myTrans.getAccountDeltaUnits() != null;
theFieldSet.setFieldVisible(MoneyWiseTransInfoClass.ACCOUNTDELTAUNITS, bShowField);
theFieldSet.setFieldEditable(MoneyWiseTransInfoClass.ACCOUNTDELTAUNITS, bEditField);
/* Determine whether the partnerDeltaUnits field should be visible */
bEditField = isEditable && isEditableField(myTrans, MoneyWiseTransInfoClass.PARTNERDELTAUNITS);
bShowField = bEditField || myTrans.getPartnerDeltaUnits() != null;
theFieldSet.setFieldVisible(MoneyWiseTransInfoClass.PARTNERDELTAUNITS, bShowField);
theFieldSet.setFieldEditable(MoneyWiseTransInfoClass.PARTNERDELTAUNITS, bEditField);
/* Determine whether the dilution field should be visible */
bEditField = isEditable && isEditableField(myTrans, MoneyWiseTransInfoClass.DILUTION); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\panel\MoneyWiseXReportTab.java | MoneyWise Personal Finance - Core | 177 |
| net\sourceforge\joceanus\moneywise\lethe\ui\panel\MoneyWiseReportTab.java | MoneyWise Personal Finance - Core | 170 |
theHTMLPane.setCSSContent(MoneyWiseXReportStyleSheet.CSS_REPORT);
/* Create listeners */
theView.getEventRegistrar().addEventListener(e -> refreshData());
theManager.getEventRegistrar().addEventListener(this::handleGoToRequest);
theError.getEventRegistrar().addEventListener(e -> handleErrorPane());
final OceanusEventRegistrar<PrometheusDataEvent> myRegistrar = theSelect.getEventRegistrar();
myRegistrar.addEventListener(PrometheusDataEvent.SELECTIONCHANGED, e -> handleReportRequest());
myRegistrar.addEventListener(PrometheusDataEvent.PRINT, e -> theHTMLPane.printIt());
myRegistrar.addEventListener(PrometheusDataEvent.SAVETOFILE, e -> theHTMLPane.saveToFile());
theHTMLPane.getEventRegistrar().addEventListener(TethysUIEvent.BUILDPAGE, e -> {
theManager.processReference(e.getDetails(String.class), theHTMLPane);
e.consume();
});
}
@Override
public TethysUIComponent getUnderlying() {
return thePanel;
}
@Override
public OceanusEventRegistrar<PrometheusDataEvent> getEventRegistrar() {
return theEventManager.getEventRegistrar();
}
@Override
public void setEnabled(final boolean pEnabled) {
/* Pass on to important elements */
theSelect.setEnabled(pEnabled);
theError.setEnabled(pEnabled);
theHTMLPane.setEnabled(pEnabled);
}
@Override
public void setVisible(final boolean pVisible) {
thePanel.setVisible(pVisible);
}
/**
* Refresh views/controls after a load/update of underlying data.
*/
private void refreshData() {
/* Obtain the active profile */
OceanusProfile myTask = theView.getActiveTask();
myTask = myTask.startTask("Reports");
/* Protect against exceptions */
try {
/* Hide the instant debug since it is now invalid */
theSpotEntry.setVisible(false);
/* Refresh the data */
theSelect.setRange(theView.getRange());
theSelect.setSecurities(theView.hasActiveSecurities());
buildReport();
/* Create SavePoint */
theSelect.createSavePoint();
} catch (OceanusException e) {
/* Show the error */
theView.addError(e);
/* Restore SavePoint */
theSelect.restoreSavePoint();
}
/* Complete the task */
myTask.end();
}
/**
* Build the report.
* @throws OceanusException on error
*/
private void buildReport() throws OceanusException {
/* Access the values from the selection */
final MoneyWiseXReportType myReportType = theSelect.getReportType(); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\controls\MoneyWiseXAnalysisSelect.java | MoneyWise Personal Finance - Core | 435 |
| net\sourceforge\joceanus\moneywise\lethe\ui\controls\MoneyWiseAnalysisSelect.java | MoneyWise Personal Finance - Core | 433 |
public MoneyWiseXAnalysisFilter<?, ?> getFilter() {
return theState.getFilter();
}
/**
* Obtain the ColumnSet.
* @return the columnSet.
*/
public MoneyWiseAnalysisColumnSet getColumns() {
return theState.getColumns();
}
/**
* Are we showing columns?
* @return true/false.
*/
public boolean showColumns() {
return theState.showColumns();
}
/**
* Create control panel.
* @param pFactory the GUI factory
* @param pNewButton the new button
* @return the panel
*/
private TethysUIBoxPaneManager buildControlPanel(final TethysUIFactory<?> pFactory,
final TethysUIButton pNewButton) {
/* Create the control panel */
final TethysUIBoxPaneManager myPanel = pFactory.paneFactory().newHBoxPane();
/* Create the labels */
final TethysUILabel myRangeLabel = pFactory.controlFactory().newLabel(NLS_RANGE);
/* Create save button */
final TethysUIButton mySave = pFactory.buttonFactory().newButton();
MetisIcon.configureSaveIconButton(mySave);
/* Create the panel */
myPanel.setBorderTitle(NLS_TITLE);
myPanel.addNode(myRangeLabel);
myPanel.addNode(theRangeButton);
myPanel.addSpacer();
myPanel.addNode(theFilterDetail);
myPanel.addSpacer();
myPanel.addNode(mySave);
myPanel.addNode(pNewButton);
/* Pass through the save event */
final OceanusEventRegistrar<TethysUIEvent> myRegistrar = mySave.getEventRegistrar();
myRegistrar.addEventListener(e -> theEventManager.fireEvent(PrometheusDataEvent.SAVETOFILE));
/* Return the panel */
return myPanel;
}
/**
* Create filter detail panel.
* @param pFactory the GUI factory
* @return the panel
*/
private TethysUIBoxPaneManager buildFilterDetail(final TethysUIFactory<?> pFactory) {
/* Create the control panel */
final TethysUIBoxPaneManager myPanel = pFactory.paneFactory().newHBoxPane();
/* Create the labels */
final TethysUILabel myFilterLabel = pFactory.controlFactory().newLabel(NLS_FILTER);
/* Create the panel */
myPanel.addNode(myFilterLabel);
myPanel.addNode(theFilterButton);
myPanel.addSpacer();
myPanel.addNode(theBucketLabel);
myPanel.addNode(theColumnLabel);
myPanel.addNode(theBucketButton);
myPanel.addNode(theColumnButton);
/* Return the panel */
return myPanel;
}
/**
* Create filter select panel.
* @param pFactory the GUI factory
* @return the panel
*/
private TethysUIBoxPaneManager buildFilterSelect(final TethysUIFactory<?> pFactory) {
/* Create the filter panel */
final TethysUIBoxPaneManager myPanel = pFactory.paneFactory().newHBoxPane();
/* Create the labels */
final TethysUILabel myTypeLabel = pFactory.controlFactory().newLabel(NLS_FILTERTYPE);
/* Add to the card panels */
theCardPanel.addCard(MoneyWiseXAnalysisType.DEPOSIT.name(), theDepositSelect); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\jca\JcaEncryptor.java | GordianKnot Security Framework | 68 |
| net\sourceforge\joceanus\gordianknot\impl\jca\JcaEncryptor.java | GordianKnot Security Framework | 232 |
JcaBlockEncryptor(final JcaFactory pFactory,
final GordianEncryptorSpec pSpec) throws GordianException {
/* Initialise underlying cipher */
super(pFactory, pSpec);
theEncryptor = JcaEncryptorFactory.getJavaEncryptor(getAlgorithmName(pSpec), false);
}
@Override
protected JcaPublicKey getPublicKey() {
return (JcaPublicKey) super.getPublicKey();
}
@Override
protected JcaPrivateKey getPrivateKey() {
return (JcaPrivateKey) super.getPrivateKey();
}
@Override
public void initForEncrypt(final GordianKeyPair pKeyPair) throws GordianException {
try {
/* Initialise underlying cipher */
JcaKeyPair.checkKeyPair(pKeyPair);
super.initForEncrypt(pKeyPair);
/* Initialise for encryption */
theEncryptor.init(Cipher.ENCRYPT_MODE, getPublicKey().getPublicKey(), getRandom());
} catch (InvalidKeyException e) {
throw new GordianCryptoException(ERROR_INIT, e);
}
}
@Override
public void initForDecrypt(final GordianKeyPair pKeyPair) throws GordianException {
try {
/* Initialise underlying cipher */
JcaKeyPair.checkKeyPair(pKeyPair);
super.initForDecrypt(pKeyPair);
/* Initialise for decryption */
theEncryptor.init(Cipher.DECRYPT_MODE, getPrivateKey().getPrivateKey());
} catch (InvalidKeyException e) {
throw new GordianCryptoException(ERROR_INIT, e);
}
}
@Override
public byte[] encrypt(final byte[] pBytes) throws GordianException {
/* Check that we are in encryption mode */
checkMode(GordianEncryptMode.ENCRYPT);
/* Encrypt the message */
return processData(pBytes);
}
@Override
public byte[] decrypt(final byte[] pBytes) throws GordianException {
/* Check that we are in decryption mode */
checkMode(GordianEncryptMode.DECRYPT);
/* Decrypt the message */
return processData(pBytes);
}
/**
* Process a data buffer.
* @param pData the buffer to process
* @return the processed buffer
* @throws GordianException on error
*/
private byte[] processData(final byte[] pData) throws GordianException {
try { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\core\base\GordianDataConverter.java | GordianKnot Security Framework | 128 |
| net\sourceforge\joceanus\oceanus\convert\OceanusDataConverter.java | Oceanus Java Core Utilities | 128 |
private GordianDataConverter() {
}
/**
* format a byte array as a hexadecimal string.
* @param pBytes the byte array
* @return the string
*/
public static String bytesToHexString(final byte[] pBytes) {
/* Allocate the string builder */
final StringBuilder myValue = new StringBuilder(2 * pBytes.length);
/* For each byte in the value */
for (final byte b : pBytes) {
/* Access the byte as an unsigned integer */
int myInt = b;
if (myInt < 0) {
myInt += BYTE_MASK + 1;
}
/* Access the high nybble */
int myDigit = myInt >>> NYBBLE_SHIFT;
char myChar = Character.forDigit(myDigit, HEX_RADIX);
/* Add it to the value string */
myValue.append(myChar);
/* Access the low digit */
myDigit = myInt
& NYBBLE_MASK;
myChar = Character.forDigit(myDigit, HEX_RADIX);
/* Add it to the value string */
myValue.append(myChar);
}
/* Return the string */
return myValue.toString();
}
/**
* format a long as a hexadecimal string.
* @param pValue the long value
* @return the string
*/
public static String longToHexString(final long pValue) {
/* Access the long value */
long myLong = pValue;
/* Allocate the string builder */
final StringBuilder myValue = new StringBuilder();
/* handle negative values */
final boolean isNegative = myLong < 0;
if (isNegative) {
myLong = -myLong;
}
/* Special case for zero */
if (myLong == 0) {
myValue.append("00");
/* else need to loop through the digits */
} else {
/* While we have digits to format */
while (myLong > 0) {
/* Access the digit and move to next one */
final int myDigit = (int) (myLong & NYBBLE_MASK);
final char myChar = Character.forDigit(myDigit, HEX_RADIX);
myValue.insert(0, myChar);
myLong >>>= NYBBLE_SHIFT;
}
/* If we are odd length prefix a zero */
if ((myValue.length() & 1) != 0) {
myValue.insert(0, '0');
}
/* Reinstate negative sign */
if (isNegative) {
myValue.insert(0, '-');
}
}
/* Return the string */
return myValue.toString();
}
/**
* parse a byte array from a hexadecimal string.
* @param pHexString the hex string
* @return the bytes
* @throws GordianException on error
*/
public static byte[] hexStringToBytes(final String pHexString) throws GordianException { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\dialog\MoneyWiseXTransactionDialog.java | MoneyWise Personal Finance - Core | 449 |
| net\sourceforge\joceanus\moneywise\lethe\ui\dialog\MoneyWiseTransactionDialog.java | MoneyWise Personal Finance - Core | 479 |
theFieldSet.setFieldEditable(MoneyWiseTransInfoClass.RETURNEDCASH, bEditField);
/* Determine whether the reconciled field should be visible */
final boolean bShowReconciled = isEditable || bIsReconciled;
theReconciledState = bIsLocked;
theDirectionState = bIsReconciled;
theFieldSet.setFieldVisible(MoneyWiseBasicResource.TRANSACTION_RECONCILED, bShowReconciled);
theFieldSet.setFieldEditable(MoneyWiseBasicResource.TRANSACTION_RECONCILED, isEditable && !bIsLocked);
/* Determine basic editing */
final boolean canEdit = isEditable && !bIsReconciled;
final boolean needsNullAmount = myTrans.needsNullAmount();
theFieldSet.setFieldEditable(MoneyWiseBasicResource.TRANSACTION_DIRECTION, canEdit && myTrans.canSwitchDirection());
theFieldSet.setFieldEditable(MoneyWiseBasicResource.TRANSACTION_ACCOUNT, canEdit);
theFieldSet.setFieldEditable(MoneyWiseBasicResource.TRANSACTION_PARTNER, canEdit);
theFieldSet.setFieldEditable(MoneyWiseBasicDataType.TRANSCATEGORY, canEdit);
theFieldSet.setFieldEditable(MoneyWiseBasicResource.MONEYWISEDATA_FIELD_DATE, canEdit);
theFieldSet.setFieldEditable(MoneyWiseBasicResource.TRANSACTION_AMOUNT, canEdit && !needsNullAmount);
theFieldSet.setFieldVisible(MoneyWiseBasicResource.TRANSACTION_AMOUNT, !needsNullAmount);
/* Set the range for the dateButton */
final MoneyWiseValidateTransaction myBuilder = (MoneyWiseValidateTransaction) myTrans.getList().getValidator();
theRange = myBuilder.getRange();
}
/**
* Is the field editable?
* @param pTrans the transaction
* @param pField the field class
* @return true/false
*/
public static boolean isEditableField(final MoneyWiseTransaction pTrans,
final MoneyWiseTransInfoClass pField) {
/* Access the infoSet */
final MoneyWiseTransInfoSet myInfoSet = pTrans.getInfoSet();
/* If the transaction is reconciled */
if (Boolean.TRUE.equals(pTrans.isReconciled())) {
/* Only allow editing of metaData */
return myInfoSet.isMetaData(pField);
}
/* Check whether the field is available */
final MetisFieldRequired isRequired = myInfoSet.isClassRequired(pField);
return !isRequired.equals(MetisFieldRequired.NOTALLOWED);
}
@SuppressWarnings("unchecked")
@Override
protected void updateField(final PrometheusFieldSetEvent pUpdate) throws OceanusException {
/* Access the field */
final MetisDataFieldId myField = pUpdate.getFieldId();
final MoneyWiseTransaction myTrans = getItem().getTransaction(); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\data\analysis\base\MoneyWiseXAnalysisValues.java | MoneyWise Personal Finance - Core | 189 |
| net\sourceforge\joceanus\moneywise\lethe\data\analysis\base\MoneyWiseAnalysisValues.java | MoneyWise Personal Finance - Core | 195 |
public void resetBaseValues() {
}
/**
* Set Value.
* @param pAttr the attribute
* @param pValue the value of the attribute
*/
public void setValue(final E pAttr,
final Object pValue) {
/* Set the value into the map */
theMap.put(pAttr, pValue);
}
/**
* Obtain an attribute value.
* @param <X> the data type
* @param pAttr the attribute
* @param pClass the class of the attribute
* @return the value of the attribute or null
*/
private <X> X getValue(final E pAttr,
final Class<X> pClass) {
/* Obtain the value */
return pClass.cast(getValue(pAttr));
}
/**
* Obtain an attribute value.
* @param pAttr the attribute
* @return the value of the attribute or null
*/
public Object getValue(final E pAttr) {
/* Obtain the attribute value */
return theMap.get(pAttr);
}
/**
* Obtain a decimal attribute value.
* @param pAttr the attribute
* @return the value of the attribute or null
*/
public OceanusDecimal getDecimalValue(final E pAttr) {
/* Obtain the attribute value */
return getValue(pAttr, OceanusDecimal.class);
}
/**
* Obtain a units attribute value.
* @param pAttr the attribute
* @return the value of the attribute or null
*/
public OceanusUnits getUnitsValue(final E pAttr) {
/* Obtain the attribute value */
return getValue(pAttr, OceanusUnits.class);
}
/**
* Obtain a price attribute value.
* @param pAttr the attribute
* @return the value of the attribute or null
*/
public OceanusPrice getPriceValue(final E pAttr) {
/* Obtain the attribute value */
return getValue(pAttr, OceanusPrice.class);
}
/**
* Obtain a money attribute value.
* @param pAttr the attribute
* @return the value of the attribute or null
*/
public OceanusMoney getMoneyValue(final E pAttr) {
/* Obtain the attribute value */
return getValue(pAttr, OceanusMoney.class);
}
/**
* Obtain a rate attribute value.
* @param pAttr the attribute
* @return the value of the attribute or null
*/
public OceanusRate getRateValue(final E pAttr) {
/* Obtain the attribute value */
return getValue(pAttr, OceanusRate.class);
}
/**
* Obtain a ratio attribute value.
* @param pAttr the attribute
* @return the value of the attribute or null
*/
public OceanusRatio getRatioValue(final E pAttr) {
/* Obtain the attribute value */
return getValue(pAttr, OceanusRatio.class);
}
/**
* Obtain a date attribute value.
* @param pAttr the attribute
* @return the value of the attribute or null
*/
public OceanusDate getDateValue(final E pAttr) {
/* Obtain the attribute value */
return getValue(pAttr, OceanusDate.class);
}
/**
* Obtain an integer attribute value.
* @param pAttr the attribute
* @return the value of the attribute or null
*/
public Integer getIntegerValue(final E pAttr) {
/* Obtain the attribute */
return getValue(pAttr, Integer.class);
}
/**
* Obtain an enum attribute value.
* @param <V> the enum type
* @param pAttr the attribute
* @param pClass the Class of the enum
* @return the value of the attribute or null
*/
public <V extends Enum<V>> V getEnumValue(final E pAttr,
final Class<V> pClass) {
/* Obtain the attribute */
return getValue(pAttr, pClass);
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWisePayee.java | MoneyWise Personal Finance - Core | 179 |
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWisePortfolio.java | MoneyWise Personal Finance - Core | 192 |
public MoneyWisePayeeInfoSet getInfoSet() {
return theInfoSet;
}
/**
* Obtain fieldValue for infoSet.
* @param pFieldId the fieldId
* @return the value
*/
private Object getFieldValue(final MetisDataFieldId pFieldId) {
return theInfoSet != null ? theInfoSet.getFieldValue(pFieldId) : null;
}
/**
* Obtain WebSite.
* @return the webSite
*/
public char[] getWebSite() {
return hasInfoSet
? theInfoSet.getValue(MoneyWiseAccountInfoClass.WEBSITE, char[].class)
: null;
}
/**
* Obtain CustNo.
* @return the customer #
*/
public char[] getCustNo() {
return hasInfoSet
? theInfoSet.getValue(MoneyWiseAccountInfoClass.CUSTOMERNO, char[].class)
: null;
}
/**
* Obtain UserId.
* @return the userId
*/
public char[] getUserId() {
return hasInfoSet
? theInfoSet.getValue(MoneyWiseAccountInfoClass.USERID, char[].class)
: null;
}
/**
* Obtain Password.
* @return the password
*/
public char[] getPassword() {
return hasInfoSet
? theInfoSet.getValue(MoneyWiseAccountInfoClass.PASSWORD, char[].class)
: null;
}
/**
* Obtain SortCode.
* @return the sort code
*/
public char[] getSortCode() {
return hasInfoSet
? theInfoSet.getValue(MoneyWiseAccountInfoClass.SORTCODE, char[].class)
: null;
}
/**
* Obtain Reference.
* @return the reference
*/
public char[] getReference() {
return hasInfoSet
? theInfoSet.getValue(MoneyWiseAccountInfoClass.REFERENCE, char[].class)
: null;
}
/**
* Obtain Account.
* @return the account
*/
public char[] getAccount() {
return hasInfoSet
? theInfoSet.getValue(MoneyWiseAccountInfoClass.ACCOUNT, char[].class)
: null;
}
/**
* Obtain Notes.
* @return the notes
*/
public char[] getNotes() {
return hasInfoSet
? theInfoSet.getValue(MoneyWiseAccountInfoClass.NOTES, char[].class)
: null;
}
@Override
public MoneyWisePayeeType getCategory() { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\data\analysis\buckets\MoneyWiseXAnalysisBucketResource.java | MoneyWise Personal Finance - Core | 33 |
| net\sourceforge\joceanus\moneywise\lethe\data\analysis\data\MoneyWiseAnalysisDataResource.java | MoneyWise Personal Finance - Core | 33 |
implements OceanusBundleId, MetisDataFieldId {
/**
* Analysis Name.
*/
ANALYSIS_NAME("Analysis.Name"),
/**
* Analysis Analyser Name.
*/
ANALYSIS_ANALYSER("Analysis.Analyser"),
/**
* Analysis Manager Name.
*/
ANALYSIS_MANAGER("Analysis.Manager"),
/**
* Analysis Chargeable Events.
*/
ANALYSIS_CHARGES("Analysis.Charges"),
/**
* Analysis Dilution Events.
*/
ANALYSIS_DILUTIONS("Analysis.Dilutions"),
/**
* Analysis Totals.
*/
ANALYSIS_TOTALS("Analysis.Totals"),
/**
* Bucket Account.
*/
BUCKET_ACCOUNT("Bucket.Account"),
/**
* Bucket BaseValues.
*/
BUCKET_BASEVALUES("Bucket.BaseValues"),
/**
* Bucket History.
*/
BUCKET_HISTORY("Bucket.History"),
/**
* Bucket SnapShot.
*/
BUCKET_SNAPSHOT("Bucket.SnapShot"),
/**
* Bucket Values.
*/
BUCKET_VALUES("Bucket.Values"),
/**
* Bucket Previous Values.
*/
BUCKET_PREVIOUS("Bucket.Previous"),
/**
* Filter All.
*/
FILTER_ALL("Filter.All"),
/**
* TransTag Name.
*/
TRANSTAG_NAME("TransTag.Name"),
/**
* TransTag List.
*/
TRANSTAG_LIST("TransTag.List"),
/**
* Cash Name.
*/
CASH_NAME("Cash.Name"),
/**
* Cash List.
*/
CASH_LIST("Cash.List"),
/**
* CashCategory Name.
*/
CASHCATEGORY_NAME("CashCategory.Name"),
/**
* CashCategory List.
*/
CASHCATEGORY_LIST("CashCategory.List"),
/**
* Deposit Name.
*/
DEPOSIT_NAME("Deposit.Name"),
/**
* Deposit List.
*/
DEPOSIT_LIST("Deposit.List"),
/**
* DepositCategory Name.
*/
DEPOSITCATEGORY_NAME("DepositCategory.Name"),
/**
* DepositCategory List.
*/
DEPOSITCATEGORY_LIST("DepositCategory.List"),
/**
* Loan Name.
*/
LOAN_NAME("Loan.Name"),
/**
* Loan List.
*/
LOAN_LIST("Loan.List"),
/**
* Loan isCreditCard.
*/
LOAN_CREDITCARD("Loan.isCreditCard"),
/**
* LoanCategory Name.
*/
LOANCATEGORY_NAME("LoanCategory.Name"),
/**
* LoanCategory List.
*/
LOANCATEGORY_LIST("LoanCategory.List"),
/**
* TransactionCategory Name.
*/
TRANSCATEGORY_NAME("TransCategory.Name"),
/**
* TransactionCategory List.
*/
TRANSCATEGORY_LIST("TransCategory.List"),
/**
* Payee Name.
*/
PAYEE_NAME("Payee.Name"),
/**
* Payee List.
*/
PAYEE_LIST("Payee.List"),
/**
* Portfolio Name.
*/
PORTFOLIO_NAME("Portfolio.Name"),
/**
* Portfolio List.
*/
PORTFOLIO_LIST("Portfolio.List"),
/**
* Portfolio Cash Name.
*/
PORTFOLIOCASH_NAME("Portfolio.Cash.Name"),
/**
* Security Name.
*/
SECURITY_NAME("Security.Name"),
/**
* Security List.
*/
SECURITY_LIST("Security.List"),
/**
* TaxBasis Name.
*/
TAXBASIS_NAME("TaxBasis.Name"),
/**
* TaxBasis List.
*/
TAXBASIS_LIST("TaxBasis.List"),
/**
* TaxBasisAccount Name.
*/
TAXBASIS_ACCOUNTNAME("TaxBasis.AccountName"),
/**
* TaxBasisAccount List.
*/
TAXBASIS_ACCOUNTLIST("TaxBasis.AccountList"),
/**
* Dilution Name.
*/
DILUTION_NAME("Dilution.Name"),
/**
* Dilution List.
*/
DILUTION_LIST("Dilution.List"),
/**
* Charge Name.
*/
CHARGE_NAME("Charge.Name"),
/**
* Charge List.
*/
CHARGE_LIST("Charge.List"),
/**
* Charge Slice.
*/
CHARGE_SLICE("Charge.Slice"),
/**
* Charge Tax.
*/
CHARGE_TAX("Charge.Tax"),
/**
* TaxCalculation.
*/
TAX_CALCULATION("Tax.Calculation"),
/**
* TaxYears.
*/
TAX_YEARS("Tax.Years");
/**
* The AnalysisType Map.
*/
private static final Map<MoneyWiseXAnalysisType, OceanusBundleId> ANALYSIS_MAP = buildAnalysisMap(); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\bc\BouncyDHKeyPair.java | GordianKnot Security Framework | 474 |
| net\sourceforge\joceanus\gordianknot\impl\bc\BouncyEllipticKeyPair.java | GordianKnot Security Framework | 650 |
theAgreement = new DHBasicAgreement();
enableDerivation();
}
@Override
public GordianAgreementMessageASN1 acceptClientHelloASN1(final GordianKeyPair pServer,
final GordianAgreementMessageASN1 pClientHello) throws GordianException {
/* Process clientHello */
BouncyKeyPair.checkKeyPair(pServer);
processClientHelloASN1(pClientHello);
final BouncyPrivateKey<?> myPrivate = (BouncyPrivateKey<?>) getPrivateKey(getServerEphemeralKeyPair());
final BouncyPublicKey<?> myPublic = (BouncyPublicKey<?>) getPublicKey(getClientEphemeralKeyPair());
/* Derive the secret */
theAgreement.init(myPrivate.getPrivateKey());
final BigInteger mySecretInt = theAgreement.calculateAgreement(myPublic.getPublicKey());
final byte[] mySecret = BigIntegers.asUnsignedByteArray(theAgreement.getFieldSize(), mySecretInt);
/* Store secret */
storeSecret(mySecret);
/* Return the serverHello */
return buildServerHelloASN1(pServer);
}
@Override
public void acceptServerHelloASN1(final GordianKeyPair pServer,
final GordianAgreementMessageASN1 pServerHello) throws GordianException {
/* process the serverHello */
BouncyKeyPair.checkKeyPair(pServer);
processServerHelloASN1(pServer, pServerHello);
final BouncyPrivateKey<?> myPrivate = (BouncyPrivateKey<?>) getPrivateKey(getClientEphemeralKeyPair());
/* Calculate agreement */
theAgreement.init(myPrivate.getPrivateKey());
final BouncyPublicKey<?> myPublic = (BouncyPublicKey<?>) getPublicKey(getServerEphemeralKeyPair());
final BigInteger mySecretInt = theAgreement.calculateAgreement(myPublic.getPublicKey());
final byte[] mySecret = BigIntegers.asUnsignedByteArray(theAgreement.getFieldSize(), mySecretInt);
/* Store secret */
storeSecret(mySecret);
}
}
/**
* DH Unified Agreement.
*/
public static class BouncyDHUnifiedAgreement | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\panel\MoneyWiseXEventTable.java | MoneyWise Personal Finance - Core | 947 |
| net\sourceforge\joceanus\moneywise\lethe\ui\panel\MoneyWiseTransactionTable.java | MoneyWise Personal Finance - Core | 954 |
final TethysUITableManager<MetisDataFieldId, MoneyWiseXAnalysisEvent> myTable = getTable();
myTable.getColumn(MoneyWiseTransDataId.DEBIT).setVisible(false);
myTable.getColumn(MoneyWiseTransDataId.CREDIT).setVisible(false);
myTable.getColumn(MoneyWiseTransDataId.BALANCE).setVisible(false);
myTable.getColumn(MoneyWiseTransInfoClass.COMMENTS).setVisible(false);
myTable.getColumn(MoneyWiseBasicResource.TRANSACTION_AMOUNT).setVisible(false);
myTable.getColumn(MoneyWiseTransInfoClass.TRANSTAG).setVisible(false);
myTable.getColumn(MoneyWiseTransInfoClass.REFERENCE).setVisible(false);
myTable.getColumn(MoneyWiseTransInfoClass.TAXCREDIT).setVisible(false);
myTable.getColumn(MoneyWiseTransInfoClass.EMPLOYERNATINS).setVisible(false);
myTable.getColumn(MoneyWiseTransInfoClass.EMPLOYEENATINS).setVisible(false);
myTable.getColumn(MoneyWiseTransInfoClass.DEEMEDBENEFIT).setVisible(false);
myTable.getColumn(MoneyWiseTransInfoClass.WITHHELD).setVisible(false);
myTable.getColumn(MoneyWiseTransInfoClass.ACCOUNTDELTAUNITS).setVisible(false);
myTable.getColumn(MoneyWiseTransInfoClass.PARTNERDELTAUNITS).setVisible(false);
myTable.getColumn(MoneyWiseTransInfoClass.PARTNERAMOUNT).setVisible(false);
myTable.getColumn(MoneyWiseTransInfoClass.DILUTION).setVisible(false);
myTable.getColumn(MoneyWiseTransInfoClass.RETURNEDCASHACCOUNT).setVisible(false);
myTable.getColumn(MoneyWiseTransInfoClass.RETURNEDCASH).setVisible(false); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\reports\MoneyWiseXReportTaxCalculation.java | MoneyWise Personal Finance - Core | 129 |
| net\sourceforge\joceanus\moneywise\lethe\reports\MoneyWiseReportTaxCalculation.java | MoneyWise Personal Finance - Core | 129 |
theBuilder.makeTotalCell(myTable, MoneyWiseXReportBuilder.TEXT_TOTAL);
theBuilder.makeTotalCell(myTable, myTaxAnalysis.getTaxableIncome());
theBuilder.makeTotalCell(myTable, myTaxAnalysis.getTaxDue());
theBuilder.startTotalRow(myTable);
theBuilder.makeTotalCell(myTable, MoneyWiseTaxClass.TAXPAID.toString());
theBuilder.makeStretchedTotalCell(myTable, myTaxAnalysis.getTaxPaid());
theBuilder.startTotalRow(myTable);
theBuilder.makeTotalCell(myTable, TEXT_PROFIT);
theBuilder.makeStretchedTotalCell(myTable, myTaxAnalysis.getTaxProfit());
/* Return the document */
return theBuilder.getDocument();
}
/**
* Build a standard tax report element.
* @param pParent the parent table
* @param pSummary the tax summary
*/
public void makeTaxReport(final MetisHTMLTable pParent,
final MoneyWiseTaxDueBucket pSummary) {
/* Format the detail */
final MetisHTMLTable myTable = theBuilder.createEmbeddedTable(pParent);
theBuilder.startRow(myTable);
theBuilder.makeTitleCell(myTable, TEXT_INCOME);
theBuilder.makeTitleCell(myTable, TEXT_RATE);
theBuilder.makeTitleCell(myTable, TEXT_TAXDUE);
/* Loop through the Transaction Detail Buckets */
final Iterator<MoneyWiseTaxBandBucket> myIterator = pSummary.taxBandIterator();
while (myIterator.hasNext()) {
final MoneyWiseTaxBandBucket myBucket = myIterator.next();
/* Format the detail */
theBuilder.startRow(myTable);
theBuilder.makeValueCell(myTable, myBucket.getAmount());
theBuilder.makeValueCell(myTable, myBucket.getRate());
theBuilder.makeValueCell(myTable, myBucket.getTaxDue());
}
/* Embed the table correctly */
theBuilder.embedTable(myTable, pSummary.getTaxBasis().toString());
}
@Override
public MoneyWiseXAnalysisFilter<?, ?> processFilter(final Object pSource) { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\reports\MoneyWiseXReportBalanceSheet.java | MoneyWise Personal Finance - Core | 509 |
| net\sourceforge\joceanus\moneywise\atlas\reports\MoneyWiseXReportBalanceSheet.java | MoneyWise Personal Finance - Core | 571 |
| net\sourceforge\joceanus\moneywise\atlas\reports\MoneyWiseXReportBalanceSheet.java | MoneyWise Personal Finance - Core | 633 |
final MoneyWiseXAnalysisDepositBucket myBucket = myIterator.next();
/* Skip record if incorrect category */
if (!MetisDataDifference.isEqual(myBucket.getCategory(), myCategory)) {
continue;
}
/* Access bucket name */
final String myName = myBucket.getName();
/* Access values */
final MoneyWiseXAnalysisAccountValues myValues = myBucket.getValues();
final MoneyWiseXAnalysisAccountValues myBaseValues = myBucket.getBaseValues();
/* Create the detail row */
theBuilder.startRow(myTable);
theBuilder.makeFilterLinkCell(myTable, myName);
/* Handle foreign accounts */
if (isForeign) {
if (myBucket.isForeignCurrency()) {
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseXAnalysisAccountAttr.BALANCE));
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseXAnalysisAccountAttr.VALUATION));
theBuilder.makeValueCell(myTable, myBaseValues.getMoneyValue(MoneyWiseXAnalysisAccountAttr.BALANCE));
theBuilder.makeValueCell(myTable, myBaseValues.getMoneyValue(MoneyWiseXAnalysisAccountAttr.VALUATION));
} else {
theBuilder.makeStretchedValueCell(myTable, myValues.getMoneyValue(MoneyWiseXAnalysisAccountAttr.VALUATION));
theBuilder.makeStretchedValueCell(myTable, myBaseValues.getMoneyValue(MoneyWiseXAnalysisAccountAttr.VALUATION));
}
} else {
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseXAnalysisAccountAttr.VALUATION));
theBuilder.makeValueCell(myTable, myBaseValues.getMoneyValue(MoneyWiseXAnalysisAccountAttr.VALUATION));
}
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseXAnalysisAccountAttr.VALUEDELTA));
/* Record the filter */
setFilterForId(myName, myBucket);
}
/* Return the table */
return myTable;
}
/**
* Create a delayed cash category table.
* @param pParent the parent table
* @param pSource the source bucket
* @return the new document fragment
*/
private MetisHTMLTable createDelayedCash(final MetisHTMLTable pParent, | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\lethe\reports\MoneyWiseReportBalanceSheet.java | MoneyWise Personal Finance - Core | 509 |
| net\sourceforge\joceanus\moneywise\lethe\reports\MoneyWiseReportBalanceSheet.java | MoneyWise Personal Finance - Core | 571 |
| net\sourceforge\joceanus\moneywise\lethe\reports\MoneyWiseReportBalanceSheet.java | MoneyWise Personal Finance - Core | 633 |
final MoneyWiseAnalysisDepositBucket myBucket = myIterator.next();
/* Skip record if incorrect category */
if (!MetisDataDifference.isEqual(myBucket.getCategory(), myCategory)) {
continue;
}
/* Access bucket name */
final String myName = myBucket.getName();
/* Access values */
final MoneyWiseAnalysisAccountValues myValues = myBucket.getValues();
final MoneyWiseAnalysisAccountValues myBaseValues = myBucket.getBaseValues();
/* Create the detail row */
theBuilder.startRow(myTable);
theBuilder.makeFilterLinkCell(myTable, myName);
/* Handle foreign accounts */
if (isForeign) {
if (myBucket.isForeignCurrency()) {
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseAnalysisAccountAttr.FOREIGNVALUE));
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseAnalysisAccountAttr.VALUATION));
theBuilder.makeValueCell(myTable, myBaseValues.getMoneyValue(MoneyWiseAnalysisAccountAttr.FOREIGNVALUE));
theBuilder.makeValueCell(myTable, myBaseValues.getMoneyValue(MoneyWiseAnalysisAccountAttr.VALUATION));
} else {
theBuilder.makeStretchedValueCell(myTable, myValues.getMoneyValue(MoneyWiseAnalysisAccountAttr.VALUATION));
theBuilder.makeStretchedValueCell(myTable, myBaseValues.getMoneyValue(MoneyWiseAnalysisAccountAttr.VALUATION));
}
} else {
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseAnalysisAccountAttr.VALUATION));
theBuilder.makeValueCell(myTable, myBaseValues.getMoneyValue(MoneyWiseAnalysisAccountAttr.VALUATION));
}
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseAnalysisAccountAttr.VALUEDELTA));
/* Record the filter */
setFilterForId(myName, myBucket);
}
/* Return the table */
return myTable;
}
/**
* Create a delayed cash category table.
* @param pParent the parent table
* @param pSource the source bucket
* @return the new document fragment
*/
private MetisHTMLTable createDelayedCash(final MetisHTMLTable pParent, | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWisePayee.java | MoneyWise Personal Finance - Core | 487 |
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWisePortfolio.java | MoneyWise Personal Finance - Core | 521 |
resolveDataLink(MoneyWiseBasicResource.CATEGORY_NAME, myEditSet.getDataList(MoneyWiseStaticDataType.PAYEETYPE, MoneyWisePayeeTypeList.class));
}
/* Resolve links in infoSet */
theInfoSet.resolveEditSetLinks(myEditSet);
}
/**
* Set a new WebSite.
* @param pWebSite the new webSite
* @throws OceanusException on error
*/
public void setWebSite(final char[] pWebSite) throws OceanusException {
setInfoSetValue(MoneyWiseAccountInfoClass.WEBSITE, pWebSite);
}
/**
* Set a new CustNo.
* @param pCustNo the new custNo
* @throws OceanusException on error
*/
public void setCustNo(final char[] pCustNo) throws OceanusException {
setInfoSetValue(MoneyWiseAccountInfoClass.CUSTOMERNO, pCustNo);
}
/**
* Set a new UserId.
* @param pUserId the new userId
* @throws OceanusException on error
*/
public void setUserId(final char[] pUserId) throws OceanusException {
setInfoSetValue(MoneyWiseAccountInfoClass.USERID, pUserId);
}
/**
* Set a new Password.
* @param pPassword the new password
* @throws OceanusException on error
*/
public void setPassword(final char[] pPassword) throws OceanusException {
setInfoSetValue(MoneyWiseAccountInfoClass.PASSWORD, pPassword);
}
/**
* Set a new SortCode.
* @param pSortCode the new sort code
* @throws OceanusException on error
*/
public void setSortCode(final char[] pSortCode) throws OceanusException {
setInfoSetValue(MoneyWiseAccountInfoClass.SORTCODE, pSortCode);
}
/**
* Set a new Account.
* @param pAccount the new account
* @throws OceanusException on error
*/
public void setAccount(final char[] pAccount) throws OceanusException {
setInfoSetValue(MoneyWiseAccountInfoClass.ACCOUNT, pAccount);
}
/**
* Set a new Reference.
* @param pReference the new reference
* @throws OceanusException on error
*/
public void setReference(final char[] pReference) throws OceanusException {
setInfoSetValue(MoneyWiseAccountInfoClass.REFERENCE, pReference);
}
/**
* Set a new Notes.
* @param pNotes the new notes
* @throws OceanusException on error
*/
public void setNotes(final char[] pNotes) throws OceanusException {
setInfoSetValue(MoneyWiseAccountInfoClass.NOTES, pNotes);
}
/**
* Set an infoSet value.
* @param pInfoClass the class of info to set
* @param pValue the value to set
* @throws OceanusException on error
*/
private void setInfoSetValue(final MoneyWiseAccountInfoClass pInfoClass,
final Object pValue) throws OceanusException {
/* Reject if there is no infoSet */
if (!hasInfoSet) {
throw new MoneyWiseLogicException(ERROR_BADINFOSET);
}
/* Set the value */
theInfoSet.setValue(pInfoClass, pValue);
}
@Override
public void touchUnderlyingItems() { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\controls\MoneyWiseXCashAnalysisSelect.java | MoneyWise Personal Finance - Core | 124 |
| net\sourceforge\joceanus\moneywise\lethe\ui\controls\MoneyWiseCashAnalysisSelect.java | MoneyWise Personal Finance - Core | 124 |
theCashButton = myButtons.newScrollButton(MoneyWiseXAnalysisCashBucket.class);
/* Create the category button */
theCatButton = myButtons.newScrollButton(MoneyWiseCashCategory.class);
/* Create Event Manager */
theEventManager = new OceanusEventManager<>();
/* Create the labels */
final TethysUIControlFactory myControls = pFactory.controlFactory();
final TethysUILabel myCatLabel = myControls.newLabel(NLS_CATEGORY + TethysUIConstant.STR_COLON);
final TethysUILabel myCshLabel = myControls.newLabel(NLS_CASH + TethysUIConstant.STR_COLON);
/* Define the layout */
thePanel = pFactory.paneFactory().newHBoxPane();
thePanel.addSpacer();
thePanel.addNode(myCatLabel);
thePanel.addNode(theCatButton);
thePanel.addStrut();
thePanel.addNode(myCshLabel);
thePanel.addNode(theCashButton);
/* Create initial state */
theState = new MoneyWiseCashState();
theState.applyState();
/* Access the menus */
theCategoryMenu = theCatButton.getMenu();
theCashMenu = theCashButton.getMenu();
/* Create the listeners */
OceanusEventRegistrar<TethysUIEvent> myRegistrar = theCatButton.getEventRegistrar();
myRegistrar.addEventListener(TethysUIEvent.NEWVALUE, e -> handleNewCategory());
theCatButton.setMenuConfigurator(e -> buildCategoryMenu());
myRegistrar = theCashButton.getEventRegistrar();
myRegistrar.addEventListener(TethysUIEvent.NEWVALUE, e -> handleNewCash());
theCashButton.setMenuConfigurator(e -> buildCashMenu());
}
@Override
public TethysUIComponent getUnderlying() {
return thePanel;
}
@Override
public OceanusEventRegistrar<PrometheusDataEvent> getEventRegistrar() {
return theEventManager.getEventRegistrar();
}
@Override
public MoneyWiseXAnalysisCashFilter getFilter() { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\controls\MoneyWiseXDepositAnalysisSelect.java | MoneyWise Personal Finance - Core | 124 |
| net\sourceforge\joceanus\moneywise\lethe\ui\controls\MoneyWiseDepositAnalysisSelect.java | MoneyWise Personal Finance - Core | 124 |
theDepositButton = myButtons.newScrollButton(MoneyWiseXAnalysisDepositBucket.class);
/* Create the category button */
theCatButton = myButtons.newScrollButton(MoneyWiseDepositCategory.class);
/* Create Event Manager */
theEventManager = new OceanusEventManager<>();
/* Create the labels */
final TethysUIControlFactory myControls = pFactory.controlFactory();
final TethysUILabel myCatLabel = myControls.newLabel(NLS_CATEGORY + TethysUIConstant.STR_COLON);
final TethysUILabel myDepLabel = myControls.newLabel(NLS_DEPOSIT + TethysUIConstant.STR_COLON);
/* Define the layout */
thePanel = pFactory.paneFactory().newHBoxPane();
thePanel.addSpacer();
thePanel.addNode(myCatLabel);
thePanel.addNode(theCatButton);
thePanel.addStrut();
thePanel.addNode(myDepLabel);
thePanel.addNode(theDepositButton);
/* Create initial state */
theState = new MoneyWiseDepositState();
theState.applyState();
/* Access the menus */
theCategoryMenu = theCatButton.getMenu();
theDepositMenu = theDepositButton.getMenu();
/* Create the listeners */
OceanusEventRegistrar<TethysUIEvent> myRegistrar = theCatButton.getEventRegistrar();
myRegistrar.addEventListener(TethysUIEvent.NEWVALUE, e -> handleNewCategory());
theCatButton.setMenuConfigurator(e -> buildCategoryMenu());
myRegistrar = theDepositButton.getEventRegistrar();
myRegistrar.addEventListener(TethysUIEvent.NEWVALUE, e -> handleNewDeposit());
theDepositButton.setMenuConfigurator(e -> buildDepositMenu());
}
@Override
public TethysUIComponent getUnderlying() {
return thePanel;
}
@Override
public OceanusEventRegistrar<PrometheusDataEvent> getEventRegistrar() {
return theEventManager.getEventRegistrar();
}
@Override
public MoneyWiseXAnalysisDepositFilter getFilter() { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\controls\MoneyWiseXLoanAnalysisSelect.java | MoneyWise Personal Finance - Core | 124 |
| net\sourceforge\joceanus\moneywise\lethe\ui\controls\MoneyWiseLoanAnalysisSelect.java | MoneyWise Personal Finance - Core | 124 |
theLoanButton = myButtons.newScrollButton(MoneyWiseXAnalysisLoanBucket.class);
/* Create the category button */
theCatButton = myButtons.newScrollButton(MoneyWiseLoanCategory.class);
/* Create Event Manager */
theEventManager = new OceanusEventManager<>();
/* Create the labels */
final TethysUIControlFactory myControls = pFactory.controlFactory();
final TethysUILabel myCatLabel = myControls.newLabel(NLS_CATEGORY + TethysUIConstant.STR_COLON);
final TethysUILabel myLoanLabel = myControls.newLabel(NLS_LOAN + TethysUIConstant.STR_COLON);
/* Define the layout */
thePanel = pFactory.paneFactory().newHBoxPane();
thePanel.addSpacer();
thePanel.addNode(myCatLabel);
thePanel.addNode(theCatButton);
thePanel.addStrut();
thePanel.addNode(myLoanLabel);
thePanel.addNode(theLoanButton);
/* Create initial state */
theState = new MoneyWiseLoanState();
theState.applyState();
/* Access the menus */
theCategoryMenu = theCatButton.getMenu();
theLoanMenu = theLoanButton.getMenu();
/* Create the listener */
OceanusEventRegistrar<TethysUIEvent> myRegistrar = theCatButton.getEventRegistrar();
myRegistrar.addEventListener(TethysUIEvent.NEWVALUE, e -> handleNewCategory());
theCatButton.setMenuConfigurator(e -> buildCategoryMenu());
myRegistrar = theLoanButton.getEventRegistrar();
myRegistrar.addEventListener(TethysUIEvent.NEWVALUE, e -> handleNewLoan());
theLoanButton.setMenuConfigurator(e -> buildLoanMenu());
}
@Override
public TethysUIComponent getUnderlying() {
return thePanel;
}
@Override
public OceanusEventRegistrar<PrometheusDataEvent> getEventRegistrar() {
return theEventManager.getEventRegistrar();
}
@Override
public MoneyWiseXAnalysisLoanFilter getFilter() { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\controls\MoneyWiseXReportSelect.java | MoneyWise Personal Finance - Core | 141 |
| net\sourceforge\joceanus\moneywise\lethe\ui\controls\MoneyWiseReportSelect.java | MoneyWise Personal Finance - Core | 141 |
theState.setType(MoneyWiseXReportType.getDefault());
/* Create Event Manager */
theEventManager = new OceanusEventManager<>();
/* Create the selection panel */
thePanel = pFactory.paneFactory().newHBoxPane();
thePanel.setBorderTitle(NLS_TITLE);
/* Define the layout */
thePanel.addNode(myRepLabel);
thePanel.addNode(theReportButton);
thePanel.addSpacer();
thePanel.addNode(theHoldingButton);
thePanel.addSpacer();
thePanel.addNode(theRangeSelect);
thePanel.addSpacer();
thePanel.addNode(thePrintButton);
thePanel.addNode(theSaveButton);
/* Add the listeners */
theReportButton.getEventRegistrar().addEventListener(TethysUIEvent.NEWVALUE, e -> handleNewReport());
theReportButton.setMenuConfigurator(e -> buildReportMenu());
theHoldingButton.getEventRegistrar().addEventListener(TethysUIEvent.NEWVALUE, e -> handleNewSecurity());
theHoldingButton.setMenuConfigurator(e -> buildHoldingMenu());
thePrintButton.getEventRegistrar().addEventListener(e -> theEventManager.fireEvent(PrometheusDataEvent.PRINT));
theSaveButton.getEventRegistrar().addEventListener(e -> theEventManager.fireEvent(PrometheusDataEvent.SAVETOFILE));
theRangeSelect.getEventRegistrar().addEventListener(TethysUIEvent.NEWVALUE, e -> handleNewRange());
}
@Override
public TethysUIComponent getUnderlying() {
return thePanel;
}
@Override
public OceanusEventRegistrar<PrometheusDataEvent> getEventRegistrar() {
return theEventManager.getEventRegistrar();
}
/**
* Obtain the report type.
* @return the report type
*/
public MoneyWiseXReportType getReportType() { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\controls\MoneyWiseXAnalysisSelect.java | MoneyWise Personal Finance - Core | 386 |
| net\sourceforge\joceanus\moneywise\lethe\ui\controls\MoneyWiseAnalysisSelect.java | MoneyWise Personal Finance - Core | 384 |
theAnalysisMgr.getEventRegistrar().addEventListener(e -> refreshData());
/* Handle buttons */
theRangeButton.getEventRegistrar().addEventListener(e -> setRangeVisibility(!isRangeVisible));
theFilterButton.getEventRegistrar().addEventListener(e -> setFilterVisibility(!isFilterVisible));
theRangeSelect.getEventRegistrar().addEventListener(TethysUIEvent.NEWVALUE, e -> handleNewRange());
/* handle sub-selections */
theDepositSelect.getEventRegistrar().addEventListener(e -> buildDepositFilter());
theCashSelect.getEventRegistrar().addEventListener(e -> buildCashFilter());
theLoanSelect.getEventRegistrar().addEventListener(e -> buildLoanFilter());
theSecuritySelect.getEventRegistrar().addEventListener(e -> buildSecurityFilter());
thePortfolioSelect.getEventRegistrar().addEventListener(e -> buildPortfolioFilter());
thePayeeSelect.getEventRegistrar().addEventListener(e -> buildPayeeFilter());
theCategorySelect.getEventRegistrar().addEventListener(e -> buildCategoryFilter());
theTaxBasisSelect.getEventRegistrar().addEventListener(e -> buildTaxBasisFilter());
theTagSelect.getEventRegistrar().addEventListener(e -> buildTagFilter());
}
@Override
public TethysUIComponent getUnderlying() {
return thePanel;
}
@Override
public OceanusEventRegistrar<PrometheusDataEvent> getEventRegistrar() {
return theEventManager.getEventRegistrar();
}
/**
* Obtain the DateDayRange.
* @return the range.
*/
public OceanusDateRange getRange() {
return theState.getRange();
}
/**
* Obtain the analysis.
* @return the range.
*/
public MoneyWiseXAnalysis getAnalysis() { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\controls\MoneyWiseXAnalysisSelect.java | MoneyWise Personal Finance - Core | 812 |
| net\sourceforge\joceanus\moneywise\lethe\ui\controls\MoneyWiseAnalysisSelect.java | MoneyWise Personal Finance - Core | 812 |
if (!myAttr.isPreserved()
&& myFilter.isRelevantCounter(myAttr)) {
/* Create a new MenuItem and add it to the popUp */
theBucketMenu.addItem(myAttr);
}
}
/* Add the entry for null bucket */
theBucketMenu.addNullItem(NLS_NONE);
}
/**
* Build Columns menu.
*/
private void buildColumnsMenu() {
/* Reset the popUp menu */
theColumnMenu.removeAllItems();
/* Determine whether we have balances */
final boolean hasBalances = theState.getType().hasBalances();
/* Loop through the sets */
for (MoneyWiseAnalysisColumnSet mySet : MoneyWiseAnalysisColumnSet.values()) {
/* if we have balances or this is not the balance set */
if (hasBalances
|| !mySet.isBalance()) {
/* Add the item */
theColumnMenu.addItem(mySet);
}
}
}
/**
* Build Deposit Filter.
*/
private void buildDepositFilter() {
applyFilter(theDepositSelect.getFilter());
}
/**
* Build Cash Filter.
*/
private void buildCashFilter() {
applyFilter(theCashSelect.getFilter());
}
/**
* Build Loan Filter.
*/
private void buildLoanFilter() {
applyFilter(theLoanSelect.getFilter());
}
/**
* Build Security Filter.
*/
private void buildSecurityFilter() {
applyFilter(theSecuritySelect.getFilter());
}
/**
* Build Portfolio Filter.
*/
private void buildPortfolioFilter() {
applyFilter(thePortfolioSelect.getFilter());
}
/**
* Build Payee Filter.
*/
private void buildPayeeFilter() {
applyFilter(thePayeeSelect.getFilter());
}
/**
* Build Category Filter.
*/
private void buildCategoryFilter() {
applyFilter(theCategorySelect.getFilter());
}
/**
* Build TaxBasis Filter.
*/
private void buildTaxBasisFilter() {
applyFilter(theTaxBasisSelect.getFilter());
}
/**
* Build Tag Filter.
*/
private void buildTagFilter() {
applyFilter(theTagSelect.getFilter());
}
/**
* Apply Filter.
* @param pFilter the filter
*/
private void applyFilter(final MoneyWiseXAnalysisFilter<?, ?> pFilter) { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\bc\BouncyDSTUKeyPair.java | GordianKnot Security Framework | 347 |
| net\sourceforge\joceanus\gordianknot\impl\bc\BouncyEllipticKeyPair.java | GordianKnot Security Framework | 355 |
theCoder = new BouncyDSTUCoder();
}
@Override
public void initForSigning(final GordianKeyPair pKeyPair) throws GordianException {
/* Initialise detail */
BouncyKeyPair.checkKeyPair(pKeyPair);
super.initForSigning(pKeyPair);
/* Initialise and set the signer */
final BouncyECPrivateKey myPrivate = (BouncyECPrivateKey) getKeyPair().getPrivateKey();
final ParametersWithRandom myParms = new ParametersWithRandom(myPrivate.getPrivateKey(), getRandom());
theSigner.init(true, myParms);
}
@Override
public void initForVerify(final GordianKeyPair pKeyPair) throws GordianException {
/* Initialise detail */
BouncyKeyPair.checkKeyPair(pKeyPair);
super.initForVerify(pKeyPair);
/* Initialise and set the signer */
final BouncyECPublicKey myPublic = (BouncyECPublicKey) getKeyPair().getPublicKey();
theSigner.init(false, myPublic.getPublicKey());
}
@Override
public byte[] sign() throws GordianException {
/* Check that we are in signing mode */
checkMode(GordianSignatureMode.SIGN);
/* Sign the message */
final BigInteger[] myValues = theSigner.generateSignature(getDigest());
return theCoder.dsaEncode(myValues[0], myValues[1]);
}
@Override
public boolean verify(final byte[] pSignature) throws GordianException {
/* Check that we are in verify mode */
checkMode(GordianSignatureMode.VERIFY);
/* Verify the message */
final BigInteger[] myValues = theCoder.dsaDecode(pSignature);
return theSigner.verifySignature(getDigest(), myValues[0], myValues[1]);
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\bc\BouncyEllipticKeyPair.java | GordianKnot Security Framework | 355 |
| net\sourceforge\joceanus\gordianknot\impl\bc\BouncyGOSTKeyPair.java | GordianKnot Security Framework | 388 |
theCoder = new BouncyDERCoder();
}
@Override
public void initForSigning(final GordianKeyPair pKeyPair) throws GordianException {
/* Initialise detail */
BouncyKeyPair.checkKeyPair(pKeyPair);
super.initForSigning(pKeyPair);
/* Initialise and set the signer */
final BouncyECPrivateKey myPrivate = (BouncyECPrivateKey) getKeyPair().getPrivateKey();
final ParametersWithRandom myParms = new ParametersWithRandom(myPrivate.getPrivateKey(), getRandom());
theSigner.init(true, myParms);
}
@Override
public void initForVerify(final GordianKeyPair pKeyPair) throws GordianException {
/* Initialise detail */
BouncyKeyPair.checkKeyPair(pKeyPair);
super.initForVerify(pKeyPair);
/* Initialise and set the signer */
final BouncyECPublicKey myPublic = (BouncyECPublicKey) getKeyPair().getPublicKey();
theSigner.init(false, myPublic.getPublicKey());
}
@Override
public byte[] sign() throws GordianException {
/* Check that we are in signing mode */
checkMode(GordianSignatureMode.SIGN);
/* Sign the message */
final BigInteger[] myValues = theSigner.generateSignature(getDigest());
return theCoder.dsaEncode(myValues[0], myValues[1]);
}
@Override
public boolean verify(final byte[] pSignature) throws GordianException {
/* Check that we are in verify mode */
checkMode(GordianSignatureMode.VERIFY);
/* Verify the message */
final BigInteger[] myValues = theCoder.dsaDecode(pSignature);
return theSigner.verifySignature(getDigest(), myValues[0], myValues[1]);
}
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\bc\BouncyDSTUKeyPair.java | GordianKnot Security Framework | 347 |
| net\sourceforge\joceanus\gordianknot\impl\bc\BouncyGOSTKeyPair.java | GordianKnot Security Framework | 388 |
theCoder = new BouncyDSTUCoder();
}
@Override
public void initForSigning(final GordianKeyPair pKeyPair) throws GordianException {
/* Initialise detail */
BouncyKeyPair.checkKeyPair(pKeyPair);
super.initForSigning(pKeyPair);
/* Initialise and set the signer */
final BouncyECPrivateKey myPrivate = (BouncyECPrivateKey) getKeyPair().getPrivateKey();
final ParametersWithRandom myParms = new ParametersWithRandom(myPrivate.getPrivateKey(), getRandom());
theSigner.init(true, myParms);
}
@Override
public void initForVerify(final GordianKeyPair pKeyPair) throws GordianException {
/* Initialise detail */
BouncyKeyPair.checkKeyPair(pKeyPair);
super.initForVerify(pKeyPair);
/* Initialise and set the signer */
final BouncyECPublicKey myPublic = (BouncyECPublicKey) getKeyPair().getPublicKey();
theSigner.init(false, myPublic.getPublicKey());
}
@Override
public byte[] sign() throws GordianException {
/* Check that we are in signing mode */
checkMode(GordianSignatureMode.SIGN);
/* Sign the message */
final BigInteger[] myValues = theSigner.generateSignature(getDigest());
return theCoder.dsaEncode(myValues[0], myValues[1]);
}
@Override
public boolean verify(final byte[] pSignature) throws GordianException {
/* Check that we are in verify mode */
checkMode(GordianSignatureMode.VERIFY);
/* Verify the message */
final BigInteger[] myValues = theCoder.dsaDecode(pSignature);
return theSigner.verifySignature(getDigest(), myValues[0], myValues[1]);
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\data\analysis\base\MoneyWiseXAnalysisValues.java | MoneyWise Personal Finance - Core | 110 |
| net\sourceforge\joceanus\moneywise\lethe\data\analysis\base\MoneyWiseAnalysisValues.java | MoneyWise Personal Finance - Core | 116 |
public void adjustToBaseValues(final T pBaseValues) {
}
/**
* Obtain delta value.
* @param pPrevious the previous values.
* @param pAttr the attribute
* @return the delta
*/
protected OceanusDecimal getDeltaValue(final T pPrevious,
final E pAttr) {
switch (pAttr.getDataType()) {
case MONEY:
return getDeltaMoneyValue(pPrevious, pAttr);
case UNITS:
return getDeltaUnitsValue(pPrevious, pAttr);
default:
return null;
}
}
/**
* Obtain delta money value.
* @param pPrevious the previous values.
* @param pAttr the attribute
* @return the delta
*/
protected OceanusMoney getDeltaMoneyValue(final T pPrevious,
final E pAttr) {
/* Access current and previous values */
OceanusMoney myCurr = getMoneyValue(pAttr);
if (pPrevious != null) {
final OceanusMoney myPrev = pPrevious.getMoneyValue(pAttr);
/* Calculate delta */
myCurr = new OceanusMoney(myCurr);
myCurr.subtractAmount(myPrev);
}
return myCurr;
}
/**
* Obtain delta units value.
* @param pPrevious the previous values.
* @param pAttr the attribute
* @return the delta
*/
protected OceanusUnits getDeltaUnitsValue(final T pPrevious,
final E pAttr) {
/* Access current and previous values */
OceanusUnits myCurr = getUnitsValue(pAttr);
if (pPrevious != null) {
final OceanusUnits myPrev = pPrevious.getUnitsValue(pAttr);
/* Calculate delta */
myCurr = new OceanusUnits(myCurr);
myCurr.subtractUnits(myPrev);
}
return myCurr;
}
/**
* Adjust money value relative to base.
* @param pBase the base values.
* @param pAttr the attribute to reBase.
*/
protected void adjustMoneyToBase(final T pBase,
final E pAttr) {
/* Adjust spend values */
OceanusMoney myValue = getMoneyValue(pAttr);
myValue = new OceanusMoney(myValue);
final OceanusMoney myBaseValue = pBase.getMoneyValue(pAttr);
myValue.subtractAmount(myBaseValue);
theMap.put(pAttr, myValue);
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\data\analysis\buckets\MoneyWiseXAnalysisAccountBucket.java | MoneyWise Personal Finance - Core | 664 |
| net\sourceforge\joceanus\moneywise\lethe\data\analysis\data\MoneyWiseAnalysisAccountBucket.java | MoneyWise Personal Finance - Core | 819 |
if (myBucket.isActive() || !myBucket.isIdle()) {
/* Add to the list */
theList.add(myBucket);
}
}
}
/**
* Obtain item by id.
* @param pId the id to lookup
* @return the item (or null if not present)
*/
public B findItemById(final Integer pId) {
/* Return results */
return theList.getItemById(pId);
}
/**
* Construct a ranged bucket.
* @param pBase the base bucket
* @param pRange the Range
* @return the new bucket
*/
protected abstract B newBucket(B pBase,
OceanusDateRange pRange);
/**
* Obtain the AccountBucket for a given account.
* @param pAccount the account
* @return the bucket
*/
public B getBucket(final T pAccount) {
/* Locate the bucket in the list */
B myItem = findItemById(pAccount.getIndexedId());
/* If the item does not yet exist */
if (myItem == null) {
/* Create the new bucket */
myItem = newBucket(pAccount);
/* Add to the list */
theList.add(myItem);
}
/* Return the bucket */
return myItem;
}
/**
* Construct a standard bucket.
* @param pAccount the Account
* @return the new bucket
*/
protected abstract B newBucket(T pAccount);
/**
* SortBuckets.
*/
protected void sortBuckets() {
theList.sortList();
}
/**
* Mark active accounts.
* @throws OceanusException on error
*/
public void markActiveAccounts() throws OceanusException {
/* Loop through the buckets */
final Iterator<B> myIterator = iterator();
while (myIterator.hasNext()) {
final B myCurr = myIterator.next();
final T myAccount = myCurr.getAccount();
/* If we are active */
if (myCurr.isActive()) {
/* Set the account as relevant */
myAccount.setRelevant();
}
/* If we are closed */
if (Boolean.TRUE.equals(myAccount.isClosed())) {
/* Ensure that we have correct closed/maturity dates */
myAccount.adjustClosed();
/* If we are Relevant */
if (myAccount.isRelevant()
&& theAnalysis.getData().checkClosedAccounts()) {
/* throw exception */
throw new MoneyWiseDataException(myCurr, "Illegally closed account");
}
}
}
}
}
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\reports\MoneyWiseXReportAssetGains.java | MoneyWise Personal Finance - Core | 139 |
| net\sourceforge\joceanus\moneywise\atlas\reports\MoneyWiseXReportPortfolioView.java | MoneyWise Personal Finance - Core | 168 |
theBuilder.makeTotalCell(myTable, myValues.getMoneyValue(MoneyWiseXAnalysisSecurityAttr.REALISEDGAINS));
/* Return the document */
return theBuilder.getDocument();
}
@Override
public MetisHTMLTable createDelayedTable(final DelayedTable pTable) {
/* Access the source */
final Object mySource = pTable.getSource();
if (mySource instanceof MoneyWiseXAnalysisPortfolioBucket) {
final MoneyWiseXAnalysisPortfolioBucket mySourceBucket = (MoneyWiseXAnalysisPortfolioBucket) mySource;
return createDelayedPortfolio(pTable.getParent(), mySourceBucket);
}
/* Return the null table */
return null;
}
/**
* Create a delayed portfolio table.
* @param pParent the parent table
* @param pSource the source bucket
* @return the new document fragment
*/
private MetisHTMLTable createDelayedPortfolio(final MetisHTMLTable pParent,
final MoneyWiseXAnalysisPortfolioBucket pSource) {
/* Access the securities and portfolio */
final MoneyWiseXAnalysisSecurityBucketList mySecurities = pSource.getSecurities();
/* Create a new table */
final MetisHTMLTable myTable = theBuilder.createEmbeddedTable(pParent);
/* Loop through the Security Buckets */
final Iterator<MoneyWiseXAnalysisSecurityBucket> myIterator = mySecurities.iterator();
while (myIterator.hasNext()) {
final MoneyWiseXAnalysisSecurityBucket myBucket = myIterator.next();
/* Access bucket name */
final String myName = myBucket.getSecurityName();
String myFullName = myBucket.getDecoratedName();
myFullName = myFullName.replace(':', '-');
/* Access values */
final MoneyWiseXAnalysisSecurityValues myValues = myBucket.getValues();
/* Create the detail row */
theBuilder.startRow(myTable);
theBuilder.makeFilterLinkCell(myTable, myFullName, myName);
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseXAnalysisSecurityAttr.VALUATION));
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseXAnalysisSecurityAttr.RESIDUALCOST));
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseXAnalysisSecurityAttr.REALISEDGAINS)); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\controls\MoneyWiseXSecurityAnalysisSelect.java | MoneyWise Personal Finance - Core | 116 |
| net\sourceforge\joceanus\moneywise\lethe\ui\controls\MoneyWiseSecurityAnalysisSelect.java | MoneyWise Personal Finance - Core | 116 |
thePortButton = myButtons.newScrollButton(MoneyWiseXAnalysisPortfolioBucket.class);
/* Create Event Manager */
theEventManager = new OceanusEventManager<>();
/* Create the labels */
final TethysUIControlFactory myControls = pFactory.controlFactory();
final TethysUILabel myPortLabel = myControls.newLabel(NLS_PORTFOLIO + TethysUIConstant.STR_COLON);
final TethysUILabel mySecLabel = myControls.newLabel(NLS_SECURITY + TethysUIConstant.STR_COLON);
/* Define the layout */
thePanel = pFactory.paneFactory().newHBoxPane();
thePanel.addSpacer();
thePanel.addNode(myPortLabel);
thePanel.addNode(thePortButton);
thePanel.addStrut();
thePanel.addNode(mySecLabel);
thePanel.addNode(theSecButton);
/* Create initial state */
theState = new MoneyWiseSecurityState();
theState.applyState();
/* Access the menus */
thePortfolioMenu = thePortButton.getMenu();
theSecurityMenu = theSecButton.getMenu();
/* Create the listener */
OceanusEventRegistrar<TethysUIEvent> myRegistrar = thePortButton.getEventRegistrar();
myRegistrar.addEventListener(TethysUIEvent.NEWVALUE, e -> handleNewPortfolio());
thePortButton.setMenuConfigurator(e -> buildPortfolioMenu());
myRegistrar = theSecButton.getEventRegistrar();
myRegistrar.addEventListener(TethysUIEvent.NEWVALUE, e -> handleNewSecurity());
theSecButton.setMenuConfigurator(e -> buildSecurityMenu());
}
@Override
public TethysUIComponent getUnderlying() {
return thePanel;
}
@Override
public OceanusEventRegistrar<PrometheusDataEvent> getEventRegistrar() {
return theEventManager.getEventRegistrar();
}
@Override
public MoneyWiseXAnalysisSecurityFilter getFilter() { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\controls\MoneyWiseXTaxBasisAnalysisSelect.java | MoneyWise Personal Finance - Core | 120 |
| net\sourceforge\joceanus\moneywise\lethe\ui\controls\MoneyWiseTaxBasisAnalysisSelect.java | MoneyWise Personal Finance - Core | 120 |
theAccountButton = myButtons.newScrollButton(MoneyWiseXAnalysisTaxBasisAccountBucket.class);
/* Create Event Manager */
theEventManager = new OceanusEventManager<>();
/* Create the labels */
final TethysUIControlFactory myControls = pFactory.controlFactory();
final TethysUILabel myBasisLabel = myControls.newLabel(NLS_BASIS + TethysUIConstant.STR_COLON);
final TethysUILabel myAccountLabel = myControls.newLabel(NLS_ACCOUNT + TethysUIConstant.STR_COLON);
/* Define the layout */
thePanel = pFactory.paneFactory().newHBoxPane();
thePanel.addSpacer();
thePanel.addNode(myBasisLabel);
thePanel.addNode(theBasisButton);
thePanel.addStrut();
thePanel.addNode(myAccountLabel);
thePanel.addNode(theAccountButton);
/* Create initial state */
theState = new MoneyWiseTaxBasisState();
theState.applyState();
/* Access the menus */
theTaxMenu = theBasisButton.getMenu();
theAccountMenu = theAccountButton.getMenu();
/* Create the listener */
OceanusEventRegistrar<TethysUIEvent> myRegistrar = theBasisButton.getEventRegistrar();
myRegistrar.addEventListener(TethysUIEvent.NEWVALUE, e -> handleNewBasis());
theBasisButton.setMenuConfigurator(e -> buildBasisMenu());
myRegistrar = theAccountButton.getEventRegistrar();
myRegistrar.addEventListener(TethysUIEvent.NEWVALUE, e -> handleNewAccount());
theAccountButton.setMenuConfigurator(e -> buildAccountMenu());
}
@Override
public TethysUIComponent getUnderlying() {
return thePanel;
}
@Override
public OceanusEventRegistrar<PrometheusDataEvent> getEventRegistrar() {
return theEventManager.getEventRegistrar();
}
@Override
public MoneyWiseXAnalysisTaxBasisFilter getFilter() { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\panel\MoneyWiseXEventTable.java | MoneyWise Personal Finance - Core | 1110 |
| net\sourceforge\joceanus\moneywise\lethe\ui\panel\MoneyWiseTransactionTable.java | MoneyWise Personal Finance - Core | 1116 |
theTable = new MoneyWiseXEventTable(pView, theEditSet, pAnalysisMgr, theError, myViewerFilter, theViewerAnalysis);
/* Create the action buttons */
final TethysUIFactory<?> myGuiFactory = pView.getGuiFactory();
/* Create the header panel */
final TethysUIPaneFactory myPanes = myGuiFactory.paneFactory();
final TethysUIBorderPaneManager myHeader = myPanes.newBorderPane();
myHeader.setCentre(theTable.getSelect());
myHeader.setNorth(theError);
myHeader.setEast(theTable.getActionButtons());
/* Create the panel */
thePanel = myPanes.newBorderPane();
thePanel.setNorth(myHeader);
thePanel.setCentre(theTable);
/* Add listeners */
theError.getEventRegistrar().addEventListener(e -> handleErrorPane());
theTable.getActionButtons().getEventRegistrar().addEventListener(this::handleActionButtons);
theTable.getEventRegistrar().addEventListener(PrometheusDataEvent.ADJUSTVISIBILITY, e -> notifyChanges());
theTable.getEventRegistrar().addEventListener(PrometheusDataEvent.GOTOWINDOW, theEventManager::cascadeEvent);
}
@Override
public TethysUIComponent getUnderlying() {
return thePanel;
}
@Override
public void setEnabled(final boolean pEnabled) {
thePanel.setEnabled(pEnabled);
}
@Override
public void setVisible(final boolean pVisible) {
thePanel.setVisible(pVisible);
}
@Override
public OceanusEventRegistrar<PrometheusDataEvent> getEventRegistrar() {
return theEventManager.getEventRegistrar();
}
/**
* Select Statement.
* @param pSelect the selection
*/
public void selectStatement(final MoneyWiseXStatementSelect pSelect) { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseCash.java | MoneyWise Personal Finance - Core | 295 |
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseDeposit.java | MoneyWise Personal Finance - Core | 324 |
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseLoan.java | MoneyWise Personal Finance - Core | 296 |
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWisePayee.java | MoneyWise Personal Finance - Core | 317 |
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWisePortfolio.java | MoneyWise Personal Finance - Core | 342 |
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseSecurity.java | MoneyWise Personal Finance - Core | 306 |
return (MoneyWiseCashList) super.getList();
}
@Override
public MetisDataState getState() {
/* Pop history for self */
MetisDataState myState = super.getState();
/* If we should use the InfoSet */
if ((myState == MetisDataState.CLEAN) && useInfoSet) {
/* Get state for infoSet */
myState = theInfoSet.getState();
}
/* Return the state */
return myState;
}
@Override
public MetisDataEditState getEditState() {
/* Pop history for self */
MetisDataEditState myState = super.getEditState();
/* If we should use the InfoSet */
if (myState == MetisDataEditState.CLEAN
&& useInfoSet) {
/* Get state for infoSet */
myState = theInfoSet.getEditState();
}
/* Return the state */
return myState;
}
@Override
public boolean hasHistory() {
/* Check for history for self */
boolean hasHistory = super.hasHistory();
/* If we should use the InfoSet */
if (!hasHistory && useInfoSet) {
/* Check history for infoSet */
hasHistory = theInfoSet.hasHistory();
}
/* Return details */
return hasHistory;
}
@Override
public void pushHistory() {
/* Push history for self */
super.pushHistory();
/* If we should use the InfoSet */
if (useInfoSet) {
/* Push history for infoSet */
theInfoSet.pushHistory();
}
}
@Override
public void popHistory() {
/* Pop history for self */
super.popHistory();
/* If we should use the InfoSet */
if (useInfoSet) {
/* Pop history for infoSet */
theInfoSet.popHistory();
}
}
@Override
public boolean checkForHistory() {
/* Check for history for self */
boolean bChanges = super.checkForHistory();
/* If we should use the InfoSet */
if (useInfoSet) {
/* Check for history for infoSet */
bChanges |= theInfoSet.checkForHistory();
}
/* return result */
return bChanges;
}
@Override
public MetisDataDifference fieldChanged(final MetisDataFieldId pField) {
/* Handle InfoSet fields */
final MoneyWiseAccountInfoClass myClass = MoneyWiseCashInfoSet.getClassForField(pField); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\lethe\reports\MoneyWiseReportAssetGains.java | MoneyWise Personal Finance - Core | 139 |
| net\sourceforge\joceanus\moneywise\lethe\reports\MoneyWiseReportPortfolioView.java | MoneyWise Personal Finance - Core | 168 |
theBuilder.makeTotalCell(myTable, myValues.getMoneyValue(MoneyWiseAnalysisSecurityAttr.REALISEDGAINS));
/* Return the document */
return theBuilder.getDocument();
}
@Override
public MetisHTMLTable createDelayedTable(final DelayedTable pTable) {
/* Access the source */
final Object mySource = pTable.getSource();
if (mySource instanceof MoneyWiseAnalysisPortfolioBucket) {
final MoneyWiseAnalysisPortfolioBucket mySourceBucket = (MoneyWiseAnalysisPortfolioBucket) mySource;
return createDelayedPortfolio(pTable.getParent(), mySourceBucket);
}
/* Return the null table */
return null;
}
/**
* Create a delayed portfolio table.
* @param pParent the parent table
* @param pSource the source bucket
* @return the new document fragment
*/
private MetisHTMLTable createDelayedPortfolio(final MetisHTMLTable pParent,
final MoneyWiseAnalysisPortfolioBucket pSource) {
/* Access the securities and portfolio */
final MoneyWiseAnalysisSecurityBucketList mySecurities = pSource.getSecurities();
/* Create a new table */
final MetisHTMLTable myTable = theBuilder.createEmbeddedTable(pParent);
/* Loop through the Security Buckets */
final Iterator<MoneyWiseAnalysisSecurityBucket> myIterator = mySecurities.iterator();
while (myIterator.hasNext()) {
final MoneyWiseAnalysisSecurityBucket myBucket = myIterator.next();
/* Access bucket name */
final String myName = myBucket.getSecurityName();
String myFullName = myBucket.getDecoratedName();
myFullName = myFullName.replace(':', '-');
/* Access values */
final MoneyWiseAnalysisSecurityValues myValues = myBucket.getValues();
/* Create the detail row */
theBuilder.startRow(myTable);
theBuilder.makeFilterLinkCell(myTable, myFullName, myName);
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseAnalysisSecurityAttr.VALUATION));
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseAnalysisSecurityAttr.RESIDUALCOST));
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseAnalysisSecurityAttr.REALISEDGAINS)); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\controls\MoneyWiseXReportSelect.java | MoneyWise Personal Finance - Core | 332 |
| net\sourceforge\joceanus\moneywise\lethe\ui\controls\MoneyWiseReportSelect.java | MoneyWise Personal Finance - Core | 332 |
theState.setType(MoneyWiseXReportType.CAPITALGAINS);
/* Notify that the state has changed */
theEventManager.fireEvent(PrometheusDataEvent.SELECTIONCHANGED);
}
/**
* Create SavePoint.
*/
public void createSavePoint() {
/* Create the savePoint */
theSavePoint = new MoneyWiseReportState(theState);
}
/**
* Restore SavePoint.
*/
public void restoreSavePoint() {
/* Restore the savePoint */
theState = new MoneyWiseReportState(theSavePoint);
/* Apply the state */
theState.applyState();
}
@Override
public void setEnabled(final boolean bEnable) {
theRangeSelect.setEnabled(bEnable);
theReportButton.setEnabled(bEnable);
theHoldingButton.setEnabled(bEnable);
thePrintButton.setEnabled(bEnable);
theSaveButton.setEnabled(bEnable);
}
@Override
public void setVisible(final boolean pVisible) {
thePanel.setVisible(pVisible);
}
/**
* Handle new report.
*/
private void handleNewReport() {
/* Set active flag */
isActive = true;
/* Look for a changed report type */
if (theState.setType(theReportButton.getValue())) {
/* Notify that the state has changed */
theEventManager.fireEvent(PrometheusDataEvent.SELECTIONCHANGED);
}
/* Clear active flag */
isActive = false;
}
/**
* Handle new holding.
*/
private void handleNewSecurity() {
/* Set active flag */
isActive = true;
/* Look for a changed report type */
if (theState.setSecurity(theHoldingButton.getValue())) {
/* Notify that the state has changed */
theEventManager.fireEvent(PrometheusDataEvent.SELECTIONCHANGED);
}
/* Clear active flag */
isActive = false;
}
/**
* Handle new range.
*/
private void handleNewRange() {
/* if we have a changed range and are not changing report */
if (theState.setRange(theRangeSelect)
&& !isActive) {
/* Notify that the state has changed */
theEventManager.fireEvent(PrometheusDataEvent.SELECTIONCHANGED);
}
}
/**
* SavePoint values.
*/
private final class MoneyWiseReportState {
/**
* The analysis.
*/
private MoneyWiseXAnalysis theAnalysis; | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\panel\MoneyWiseXEventTable.java | MoneyWise Personal Finance - Core | 381 |
| net\sourceforge\joceanus\moneywise\lethe\ui\panel\MoneyWiseTransactionTable.java | MoneyWise Personal Finance - Core | 386 |
.setCellValueFactory(MoneyWiseXEventTable::getFilteredAction)
.setName(MoneyWiseUIResource.STATICDATA_ACTIVE.getValue())
.setEditable(true)
.setCellEditable(r -> !r.isHeader() && !r.isReconciled())
.setColumnWidth(WIDTH_ICON)
.setOnCommit((r, v) -> updateField(this::deleteRow, r, v));
/* Add listeners */
pView.getEventRegistrar().addEventListener(e -> refreshData());
theActionButtons.getEventRegistrar().addEventListener(this::handleActionButtons);
theNewButton.getEventRegistrar().addEventListener(e -> addNewItem());
theError.getEventRegistrar().addEventListener(e -> handleErrorPane());
theSelect.getEventRegistrar().addEventListener(PrometheusDataEvent.SELECTIONCHANGED, e -> handleFilterSelection());
theSelect.getEventRegistrar().addEventListener(PrometheusDataEvent.SAVETOFILE, e -> writeCSVToFile(pView.getGuiFactory()));
theActiveTran.getEventRegistrar().addEventListener(PrometheusDataEvent.ADJUSTVISIBILITY, e -> handlePanelState());
/* Hide the action buttons initially */
theActionButtons.setVisible(false);
theFilter = theSelect.getFilter();
/* Initialise the columns */
adjustColumns(theSelect.showColumns()
? theSelect.getColumns()
: MoneyWiseAnalysisColumnSet.BALANCE);
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseCash.java | MoneyWise Personal Finance - Core | 296 |
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseTransaction.java | MoneyWise Personal Finance - Core | 445 |
}
@Override
public MetisDataState getState() {
/* Pop history for self */
MetisDataState myState = super.getState();
/* If we should use the InfoSet */
if ((myState == MetisDataState.CLEAN) && useInfoSet) {
/* Get state for infoSet */
myState = theInfoSet.getState();
}
/* Return the state */
return myState;
}
@Override
public MetisDataEditState getEditState() {
/* Pop history for self */
MetisDataEditState myState = super.getEditState();
/* If we should use the InfoSet */
if (myState == MetisDataEditState.CLEAN
&& useInfoSet) {
/* Get state for infoSet */
myState = theInfoSet.getEditState();
}
/* Return the state */
return myState;
}
@Override
public boolean hasHistory() {
/* Check for history for self */
boolean hasHistory = super.hasHistory();
/* If we should use the InfoSet */
if (!hasHistory && useInfoSet) {
/* Check history for infoSet */
hasHistory = theInfoSet.hasHistory();
}
/* Return details */
return hasHistory;
}
@Override
public void pushHistory() {
/* Push history for self */
super.pushHistory();
/* If we should use the InfoSet */
if (useInfoSet) {
/* Push history for infoSet */
theInfoSet.pushHistory();
}
}
@Override
public void popHistory() {
/* Pop history for self */
super.popHistory();
/* If we should use the InfoSet */
if (useInfoSet) {
/* Pop history for infoSet */
theInfoSet.popHistory();
}
}
@Override
public boolean checkForHistory() {
/* Check for history for self */
boolean bChanges = super.checkForHistory();
/* If we should use the InfoSet */
if (useInfoSet) {
/* Check for history for infoSet */
bChanges |= theInfoSet.checkForHistory();
}
/* return result */
return bChanges;
}
@Override
public MetisDataDifference fieldChanged(final MetisDataFieldId pField) {
/* Handle InfoSet fields */
final MoneyWiseAccountInfoClass myClass = MoneyWiseCashInfoSet.getClassForField(pField); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseDeposit.java | MoneyWise Personal Finance - Core | 325 |
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseTransaction.java | MoneyWise Personal Finance - Core | 445 |
}
@Override
public MetisDataState getState() {
/* Pop history for self */
MetisDataState myState = super.getState();
/* If we should use the InfoSet */
if ((myState == MetisDataState.CLEAN) && useInfoSet) {
/* Get state for infoSet */
myState = theInfoSet.getState();
}
/* Return the state */
return myState;
}
@Override
public MetisDataEditState getEditState() {
/* Pop history for self */
MetisDataEditState myState = super.getEditState();
/* If we should use the InfoSet */
if (myState == MetisDataEditState.CLEAN
&& useInfoSet) {
/* Get state for infoSet */
myState = theInfoSet.getEditState();
}
/* Return the state */
return myState;
}
@Override
public boolean hasHistory() {
/* Check for history for self */
boolean hasHistory = super.hasHistory();
/* If we should use the InfoSet */
if (!hasHistory && useInfoSet) {
/* Check history for infoSet */
hasHistory = theInfoSet.hasHistory();
}
/* Return details */
return hasHistory;
}
@Override
public void pushHistory() {
/* Push history for self */
super.pushHistory();
/* If we should use the InfoSet */
if (useInfoSet) {
/* Push history for infoSet */
theInfoSet.pushHistory();
}
}
@Override
public void popHistory() {
/* Pop history for self */
super.popHistory();
/* If we should use the InfoSet */
if (useInfoSet) {
/* Pop history for infoSet */
theInfoSet.popHistory();
}
}
@Override
public boolean checkForHistory() {
/* Check for history for self */
boolean bChanges = super.checkForHistory();
/* If we should use the InfoSet */
if (useInfoSet) {
/* Check for history for infoSet */
bChanges |= theInfoSet.checkForHistory();
}
/* return result */
return bChanges;
}
@Override
public MetisDataDifference fieldChanged(final MetisDataFieldId pField) {
/* Handle InfoSet fields */
final MoneyWiseAccountInfoClass myClass = MoneyWiseDepositInfoSet.getClassForField(pField); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseLoan.java | MoneyWise Personal Finance - Core | 297 |
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseTransaction.java | MoneyWise Personal Finance - Core | 445 |
}
@Override
public MetisDataState getState() {
/* Pop history for self */
MetisDataState myState = super.getState();
/* If we should use the InfoSet */
if ((myState == MetisDataState.CLEAN) && useInfoSet) {
/* Get state for infoSet */
myState = theInfoSet.getState();
}
/* Return the state */
return myState;
}
@Override
public MetisDataEditState getEditState() {
/* Pop history for self */
MetisDataEditState myState = super.getEditState();
/* If we should use the InfoSet */
if (myState == MetisDataEditState.CLEAN
&& useInfoSet) {
/* Get state for infoSet */
myState = theInfoSet.getEditState();
}
/* Return the state */
return myState;
}
@Override
public boolean hasHistory() {
/* Check for history for self */
boolean hasHistory = super.hasHistory();
/* If we should use the InfoSet */
if (!hasHistory && useInfoSet) {
/* Check history for infoSet */
hasHistory = theInfoSet.hasHistory();
}
/* Return details */
return hasHistory;
}
@Override
public void pushHistory() {
/* Push history for self */
super.pushHistory();
/* If we should use the InfoSet */
if (useInfoSet) {
/* Push history for infoSet */
theInfoSet.pushHistory();
}
}
@Override
public void popHistory() {
/* Pop history for self */
super.popHistory();
/* If we should use the InfoSet */
if (useInfoSet) {
/* Pop history for infoSet */
theInfoSet.popHistory();
}
}
@Override
public boolean checkForHistory() {
/* Check for history for self */
boolean bChanges = super.checkForHistory();
/* If we should use the InfoSet */
if (useInfoSet) {
/* Check for history for infoSet */
bChanges |= theInfoSet.checkForHistory();
}
/* return result */
return bChanges;
}
@Override
public MetisDataDifference fieldChanged(final MetisDataFieldId pField) {
/* Handle InfoSet fields */
final MoneyWiseAccountInfoClass myClass = MoneyWiseLoanInfoSet.getClassForField(pField); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWisePayee.java | MoneyWise Personal Finance - Core | 318 |
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseTransaction.java | MoneyWise Personal Finance - Core | 445 |
}
@Override
public MetisDataState getState() {
/* Pop history for self */
MetisDataState myState = super.getState();
/* If we should use the InfoSet */
if ((myState == MetisDataState.CLEAN) && useInfoSet) {
/* Get state for infoSet */
myState = theInfoSet.getState();
}
/* Return the state */
return myState;
}
@Override
public MetisDataEditState getEditState() {
/* Pop history for self */
MetisDataEditState myState = super.getEditState();
/* If we should use the InfoSet */
if (myState == MetisDataEditState.CLEAN
&& useInfoSet) {
/* Get state for infoSet */
myState = theInfoSet.getEditState();
}
/* Return the state */
return myState;
}
@Override
public boolean hasHistory() {
/* Check for history for self */
boolean hasHistory = super.hasHistory();
/* If we should use the InfoSet */
if (!hasHistory && useInfoSet) {
/* Check history for infoSet */
hasHistory = theInfoSet.hasHistory();
}
/* Return details */
return hasHistory;
}
@Override
public void pushHistory() {
/* Push history for self */
super.pushHistory();
/* If we should use the InfoSet */
if (useInfoSet) {
/* Push history for infoSet */
theInfoSet.pushHistory();
}
}
@Override
public void popHistory() {
/* Pop history for self */
super.popHistory();
/* If we should use the InfoSet */
if (useInfoSet) {
/* Pop history for infoSet */
theInfoSet.popHistory();
}
}
@Override
public boolean checkForHistory() {
/* Check for history for self */
boolean bChanges = super.checkForHistory();
/* If we should use the InfoSet */
if (useInfoSet) {
/* Check for history for infoSet */
bChanges |= theInfoSet.checkForHistory();
}
/* return result */
return bChanges;
}
@Override
public MetisDataDifference fieldChanged(final MetisDataFieldId pField) {
/* Handle InfoSet fields */
final MoneyWiseAccountInfoClass myClass = MoneyWisePayeeInfoSet.getClassForField(pField); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWisePortfolio.java | MoneyWise Personal Finance - Core | 343 |
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseTransaction.java | MoneyWise Personal Finance - Core | 445 |
}
@Override
public MetisDataState getState() {
/* Pop history for self */
MetisDataState myState = super.getState();
/* If we should use the InfoSet */
if ((myState == MetisDataState.CLEAN) && useInfoSet) {
/* Get state for infoSet */
myState = theInfoSet.getState();
}
/* Return the state */
return myState;
}
@Override
public MetisDataEditState getEditState() {
/* Pop history for self */
MetisDataEditState myState = super.getEditState();
/* If we should use the InfoSet */
if (myState == MetisDataEditState.CLEAN
&& useInfoSet) {
/* Get state for infoSet */
myState = theInfoSet.getEditState();
}
/* Return the state */
return myState;
}
@Override
public boolean hasHistory() {
/* Check for history for self */
boolean hasHistory = super.hasHistory();
/* If we should use the InfoSet */
if (!hasHistory && useInfoSet) {
/* Check history for infoSet */
hasHistory = theInfoSet.hasHistory();
}
/* Return details */
return hasHistory;
}
@Override
public void pushHistory() {
/* Push history for self */
super.pushHistory();
/* If we should use the InfoSet */
if (useInfoSet) {
/* Push history for infoSet */
theInfoSet.pushHistory();
}
}
@Override
public void popHistory() {
/* Pop history for self */
super.popHistory();
/* If we should use the InfoSet */
if (useInfoSet) {
/* Pop history for infoSet */
theInfoSet.popHistory();
}
}
@Override
public boolean checkForHistory() {
/* Check for history for self */
boolean bChanges = super.checkForHistory();
/* If we should use the InfoSet */
if (useInfoSet) {
/* Check for history for infoSet */
bChanges |= theInfoSet.checkForHistory();
}
/* return result */
return bChanges;
}
@Override
public MetisDataDifference fieldChanged(final MetisDataFieldId pField) {
/* Handle InfoSet fields */
final MoneyWiseAccountInfoClass myClass = MoneyWisePortfolioInfoSet.getClassForField(pField); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseSecurity.java | MoneyWise Personal Finance - Core | 307 |
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseTransaction.java | MoneyWise Personal Finance - Core | 445 |
}
@Override
public MetisDataState getState() {
/* Pop history for self */
MetisDataState myState = super.getState();
/* If we should use the InfoSet */
if ((myState == MetisDataState.CLEAN) && useInfoSet) {
/* Get state for infoSet */
myState = theInfoSet.getState();
}
/* Return the state */
return myState;
}
@Override
public MetisDataEditState getEditState() {
/* Pop history for self */
MetisDataEditState myState = super.getEditState();
/* If we should use the InfoSet */
if (myState == MetisDataEditState.CLEAN
&& useInfoSet) {
/* Get state for infoSet */
myState = theInfoSet.getEditState();
}
/* Return the state */
return myState;
}
@Override
public boolean hasHistory() {
/* Check for history for self */
boolean hasHistory = super.hasHistory();
/* If we should use the InfoSet */
if (!hasHistory && useInfoSet) {
/* Check history for infoSet */
hasHistory = theInfoSet.hasHistory();
}
/* Return details */
return hasHistory;
}
@Override
public void pushHistory() {
/* Push history for self */
super.pushHistory();
/* If we should use the InfoSet */
if (useInfoSet) {
/* Push history for infoSet */
theInfoSet.pushHistory();
}
}
@Override
public void popHistory() {
/* Pop history for self */
super.popHistory();
/* If we should use the InfoSet */
if (useInfoSet) {
/* Pop history for infoSet */
theInfoSet.popHistory();
}
}
@Override
public boolean checkForHistory() {
/* Check for history for self */
boolean bChanges = super.checkForHistory();
/* If we should use the InfoSet */
if (useInfoSet) {
/* Check for history for infoSet */
bChanges |= theInfoSet.checkForHistory();
}
/* return result */
return bChanges;
}
@Override
public MetisDataDifference fieldChanged(final MetisDataFieldId pField) {
/* Handle InfoSet fields */
final MoneyWiseAccountInfoClass myClass = MoneyWiseSecurityInfoSet.getClassForField(pField); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\panel\MoneyWiseXEventTable.java | MoneyWise Personal Finance - Core | 917 |
| net\sourceforge\joceanus\moneywise\lethe\ui\panel\MoneyWiseTransactionTable.java | MoneyWise Personal Finance - Core | 923 |
myTable.getColumn(MoneyWiseTransInfoClass.RETURNEDCASH).setVisible(true);
break;
case ALL:
default:
myTable.getColumn(MoneyWiseTransInfoClass.COMMENTS).setVisible(true);
myTable.getColumn(MoneyWiseBasicResource.TRANSACTION_AMOUNT).setVisible(true);
myTable.getColumn(MoneyWiseTransInfoClass.TRANSTAG).setVisible(true);
myTable.getColumn(MoneyWiseTransInfoClass.REFERENCE).setVisible(true);
myTable.getColumn(MoneyWiseTransInfoClass.TAXCREDIT).setVisible(true);
myTable.getColumn(MoneyWiseTransInfoClass.EMPLOYERNATINS).setVisible(true);
myTable.getColumn(MoneyWiseTransInfoClass.EMPLOYEENATINS).setVisible(true);
myTable.getColumn(MoneyWiseTransInfoClass.DEEMEDBENEFIT).setVisible(true);
myTable.getColumn(MoneyWiseTransInfoClass.WITHHELD).setVisible(true);
myTable.getColumn(MoneyWiseTransInfoClass.ACCOUNTDELTAUNITS).setVisible(true);
myTable.getColumn(MoneyWiseTransInfoClass.PARTNERDELTAUNITS).setVisible(true);
myTable.getColumn(MoneyWiseTransInfoClass.PARTNERAMOUNT).setVisible(true);
myTable.getColumn(MoneyWiseTransInfoClass.DILUTION).setVisible(true);
myTable.getColumn(MoneyWiseTransInfoClass.RETURNEDCASHACCOUNT).setVisible(true);
myTable.getColumn(MoneyWiseTransInfoClass.RETURNEDCASH).setVisible(true); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\dialog\MoneyWiseXTransactionDialog.java | MoneyWise Personal Finance - Core | 606 |
| net\sourceforge\joceanus\moneywise\lethe\ui\dialog\MoneyWiseTransactionDialog.java | MoneyWise Personal Finance - Core | 636 |
final MoneyWiseXAnalysisFilter<?, ?> myFilter = myIterator.next();
/* declare it */
declareGoToFilter(myFilter);
}
/* If we have not had updates */
if (!pUpdates) {
/* Allow GoTo different panels */
buildAssetGoTo(myItem.getAccount());
buildAssetGoTo(myItem.getPartner());
declareGoToItem(myItem.getCategory());
buildAssetGoTo(myItem.getReturnedCashAccount());
}
}
/**
* Handle goto declarations for TransactionAssets.
* @param pAsset the asset
*/
private void buildAssetGoTo(final MoneyWiseTransAsset pAsset) {
if (pAsset instanceof MoneyWiseSecurityHolding) {
/* Build menu Items for Portfolio and Security */
final MoneyWiseSecurityHolding myHolding = (MoneyWiseSecurityHolding) pAsset;
declareGoToItem(myHolding.getPortfolio());
declareGoToItem(myHolding.getSecurity());
} else if (pAsset instanceof MoneyWiseAssetBase) {
declareGoToItem((MoneyWiseAssetBase) pAsset);
}
}
/**
* Resolve Asset.
* @param pAsset the asset to resolve
* @return the resolved asset
*/
public static MoneyWiseTransAsset resolveAsset(final MoneyWiseTransAsset pAsset) {
/* If this is a security holding */
if (pAsset instanceof MoneyWiseSecurityHolding) {
/* declare holding via map */
final MoneyWiseSecurityHolding myHolding = (MoneyWiseSecurityHolding) pAsset;
final MoneyWisePortfolio myPortfolio = myHolding.getPortfolio();
final MoneyWiseSecurity mySecurity = myHolding.getSecurity();
final MoneyWiseDataSet myData = myPortfolio.getDataSet();
final MoneyWiseSecurityHoldingMap myMap = myData.getPortfolios().getSecurityHoldingsMap();
return myMap.declareHolding(myPortfolio, mySecurity);
}
/* Just return the asset */
return pAsset;
}
/**
* Build the account menu for an item.
* @param pMenu the menu
* @param pEvent the event to build for
*/
public void buildAccountMenu(final TethysUIScrollMenu<MoneyWiseTransAsset> pMenu,
final MoneyWiseXAnalysisEvent pEvent) { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\themis\analysis\ThemisAnalysisClass.java | Themis Core Project Framework | 78 |
| net\sourceforge\joceanus\themis\analysis\ThemisAnalysisInterface.java | Themis Core Project Framework | 86 |
final ThemisAnalysisContainer myParent = pParser.getParent();
final ThemisAnalysisDataMap myParentDataMap = myParent.getDataMap();
theDataMap = new ThemisAnalysisDataMap(myParentDataMap);
/* If this is a local class */
if (!(myParent instanceof ThemisAnalysisObject)
&& (!(myParent instanceof ThemisAnalysisFile))) {
final int myId = myParentDataMap.getLocalId(theShortName);
theFullName = myParent.determineFullChildName(myId + theShortName);
/* else handle standard name */
} else {
theFullName = myParent.determineFullChildName(theShortName);
}
/* Handle generic variables */
ThemisAnalysisLine myLine = pLine;
if (ThemisAnalysisGeneric.isGeneric(pLine)) {
/* Declare them to the properties */
theProperties = theProperties.setGenericVariables(new ThemisAnalysisGenericBase(pParser, myLine));
myLine = (ThemisAnalysisLine) pParser.popNextLine();
}
/* declare the class */
theDataMap.declareObject(this);
/* Parse the headers */
final Deque<ThemisAnalysisElement> myHeaders = ThemisAnalysisBuilder.parseHeaders(pParser, myLine);
theNumLines = myHeaders.size() + 1;
/* Parse the body */
final Deque<ThemisAnalysisElement> myLines = ThemisAnalysisBuilder.processBody(pParser);
/* Create a parser */
theContents = new ArrayDeque<>();
final ThemisAnalysisParser myParser = new ThemisAnalysisParser(myLines, theContents, this);
/* Resolve the generics */
theProperties.resolveGeneric(myParser);
/* Parse the ancestors and lines */
theAncestors = myParser.parseAncestors(myHeaders);
myParser.processLines();
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\tethys\javafx\button\TethysUIFXDateDialog.java | Tethys JavaFX Utilities | 688 |
| net\sourceforge\joceanus\tethys\swing\button\TethysUISwingDateDialog.java | Tethys Java Swing Utilities | 753 |
myLabel.setWeekend();
}
/* Determine whether the day is select-able */
boolean isSelectable = true;
if (iEarliest > 0) {
isSelectable &= iDay >= iEarliest;
}
if (iLatest > 0) {
isSelectable &= iDay <= iLatest;
}
/* Check for allowed date */
isSelectable &= theConfig.isAllowed(iDay);
/* Set text */
myLabel.setDay(iDay, isSelectable);
}
/* Loop through remaining columns in row */
for (int iDay = 1; iCol < DAYS_IN_WEEK; iCol++, iDay++) {
/* Access the label */
final PanelDay myLabel = theDays[iRow][iCol];
/* Reset the day and set no day */
myLabel.resetDay(false);
myLabel.setDay(iDay, false);
}
/* Resize to the number of rows */
reSizeRows(iRow + 1);
}
/**
* build Day names.
*/
void buildDayNames() {
/* Get todays date */
final Locale myLocale = theConfig.getLocale();
final Calendar myDate = Calendar.getInstance(myLocale);
int myStart = myDate.getFirstDayOfWeek();
if (myStart == Calendar.SUNDAY) {
myStart += DAYS_IN_WEEK;
}
/* Build the array of the days of the week */
DayOfWeek myDoW = DayOfWeek.of(myStart - 1);
for (int iDay = 0; iDay < DAYS_IN_WEEK; iDay++, myDoW = myDoW.plus(1)) {
/* Store the day into the array */
theDaysOfWk[iDay] = myDoW;
}
/* Loop through the labels */
for (int iCol = 0; iCol < DAYS_IN_WEEK; iCol++) {
/* Access the label */
final Label myLabel = theHdrs[iCol]; | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\metis\ui\MetisPreferenceSetView.java | Metis Data Framework | 790 |
| net\sourceforge\joceanus\metis\ui\MetisPreferenceSetView.java | Metis Data Framework | 885 |
FilePreferenceElement(final MetisStringPreference pItem) {
/* Store parameters */
theItem = pItem;
theField = theGuiFactory.fieldFactory().newStringField();
theField.setEditable(true);
/* Create the button */
theButton = theGuiFactory.buttonFactory().newButton();
theButton.setTextOnly();
theButton.setText(pItem.getDisplay());
/* Add to the Grid Pane */
theGrid.addCell(theButton);
theGrid.addCell(theField);
theGrid.setCellColumnSpan(theField, 2);
theGrid.allowCellGrowth(theField);
theGrid.newRow();
/* Create listeners */
theButton.getEventRegistrar().addEventListener(e -> handleDialog());
theField.getEventRegistrar().addEventListener(e -> {
pItem.setValue(theField.getValue());
notifyChanges();
});
}
@Override
public void updateField() {
/* Update the field */
theField.setValue(theItem.getValue());
/* Set changed indication */
theField.setTheAttributeState(TethysUIFieldAttribute.CHANGED, theItem.isChanged());
theField.adjustField();
/* Handle hidden state */
final boolean isEnabled = !theItem.isHidden();
theField.setEnabled(isEnabled);
theButton.setEnabled(isEnabled);
}
/**
* Handle Dialog.
*/
private void handleDialog() {
ensureSelector();
theSelector.setInitialFile(new File(theItem.getValue())); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\dialog\MoneyWiseXTransactionDialog.java | MoneyWise Personal Finance - Core | 203 |
| net\sourceforge\joceanus\moneywise\lethe\ui\dialog\MoneyWiseTransactionDialog.java | MoneyWise Personal Finance - Core | 198 |
theFieldSet.addField(MoneyWiseBasicResource.TRANSACTION_RECONCILED, myReconciledButton, MoneyWiseXAnalysisEvent::isReconciled);
/* Configure the menuBuilders */
myDateButton.setDateConfigurator(this::handleDateConfig);
myAccountButton.setMenuConfigurator(c -> buildAccountMenu(c, getItem()));
myCategoryButton.setMenuConfigurator(c -> buildCategoryMenu(c, getItem()));
myPartnerButton.setMenuConfigurator(c -> buildPartnerMenu(c, getItem()));
final Map<Boolean, TethysUIIconMapSet<Boolean>> myRecMapSets = MoneyWiseIcon.configureReconciledIconButton(pFactory);
myReconciledButton.setIconMapSet(() -> myRecMapSets.get(theReconciledState));
final Map<Boolean, TethysUIIconMapSet<MoneyWiseAssetDirection>> myDirMapSets = MoneyWiseIcon.configureDirectionIconButton(pFactory);
myDirectionButton.setIconMapSet(() -> myDirMapSets.get(theDirectionState));
myAmount.setDeemedCurrency(() -> getItem().getAccount().getCurrency());
}
/**
* Build info subPanel.
* @param pFactory the GUI factory
*/
private void buildInfoPanel(final TethysUIFactory<?> pFactory) {
/* Create a new panel */
theFieldSet.newPanel(TAB_INFO);
/* Allocate fields */
final TethysUIFieldFactory myFields = pFactory.fieldFactory();
final TethysUIMoneyEditField myAmount = myFields.newMoneyField();
final TethysUIStringEditField myComments = myFields.newStringField();
final TethysUIStringEditField myReference = myFields.newStringField();
/* Create the buttons */
final TethysUIListButtonField<MoneyWiseTransTag> myTagButton = myFields.newListField(); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\themis\analysis\ThemisAnalysisClass.java | Themis Core Project Framework | 77 |
| net\sourceforge\joceanus\themis\analysis\ThemisAnalysisEnum.java | Themis Core Project Framework | 84 |
theProperties = pLine.getProperties();
final ThemisAnalysisContainer myParent = pParser.getParent();
final ThemisAnalysisDataMap myParentDataMap = myParent.getDataMap();
theDataMap = new ThemisAnalysisDataMap(myParentDataMap);
/* If this is a local class */
if (!(myParent instanceof ThemisAnalysisObject)
&& (!(myParent instanceof ThemisAnalysisFile))) {
final int myId = myParentDataMap.getLocalId(theShortName);
theFullName = myParent.determineFullChildName(myId + theShortName);
/* else handle standard name */
} else {
theFullName = myParent.determineFullChildName(theShortName);
}
/* Handle generic variables */
ThemisAnalysisLine myLine = pLine;
if (ThemisAnalysisGeneric.isGeneric(pLine)) {
/* Declare them to the properties */
theProperties = theProperties.setGenericVariables(new ThemisAnalysisGenericBase(pParser, myLine));
myLine = (ThemisAnalysisLine) pParser.popNextLine();
}
/* declare the class */
theDataMap.declareObject(this);
/* Parse the headers */
final Deque<ThemisAnalysisElement> myHeaders = ThemisAnalysisBuilder.parseHeaders(pParser, myLine);
theNumLines = myHeaders.size() + 1;
/* Parse the body */
final Deque<ThemisAnalysisElement> myLines = ThemisAnalysisBuilder.processBody(pParser);
/* Create a parser */
theContents = new ArrayDeque<>();
final ThemisAnalysisParser myParser = new ThemisAnalysisParser(myLines, theContents, this);
/* Resolve the generics */
theProperties.resolveGeneric(myParser);
/* Parse the ancestors and lines */
theAncestors = myParser.parseAncestors(myHeaders); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\themis\analysis\ThemisAnalysisEnum.java | Themis Core Project Framework | 85 |
| net\sourceforge\joceanus\themis\analysis\ThemisAnalysisInterface.java | Themis Core Project Framework | 86 |
final ThemisAnalysisContainer myParent = pParser.getParent();
final ThemisAnalysisDataMap myParentDataMap = myParent.getDataMap();
theDataMap = new ThemisAnalysisDataMap(myParentDataMap);
/* If this is a local enum */
if (!(myParent instanceof ThemisAnalysisObject)
&& (!(myParent instanceof ThemisAnalysisFile))) {
final int myId = myParentDataMap.getLocalId(theShortName);
theFullName = myParent.determineFullChildName(myId + theShortName);
/* else handle standard name */
} else {
theFullName = myParent.determineFullChildName(theShortName);
}
/* Handle generic variables */
ThemisAnalysisLine myLine = pLine;
if (ThemisAnalysisGeneric.isGeneric(pLine)) {
/* Declare them to the properties */
theProperties = theProperties.setGenericVariables(new ThemisAnalysisGenericBase(pParser, myLine));
myLine = (ThemisAnalysisLine) pParser.popNextLine();
}
/* declare the enum */
theDataMap.declareObject(this);
/* Parse the headers */
final Deque<ThemisAnalysisElement> myHeaders = ThemisAnalysisBuilder.parseHeaders(pParser, myLine);
theNumLines = myHeaders.size() + 1;
/* Parse the body */
final Deque<ThemisAnalysisElement> myLines = ThemisAnalysisBuilder.processBody(pParser);
/* Create a parser */
theContents = new ArrayDeque<>();
final ThemisAnalysisParser myParser = new ThemisAnalysisParser(myLines, theContents, this);
/* Resolve the generics */
theProperties.resolveGeneric(myParser);
/* Parse the ancestors and lines */
theAncestors = myParser.parseAncestors(myHeaders); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\dialog\MoneyWiseXTransactionDialog.java | MoneyWise Personal Finance - Core | 897 |
| net\sourceforge\joceanus\moneywise\lethe\ui\dialog\MoneyWiseTransactionDialog.java | MoneyWise Personal Finance - Core | 925 |
final MoneyWiseDataValidatorTrans myValidator = pEvent.getTransaction().getList().getValidator();
/* Loop through the available category values */
final Iterator<MoneyWiseTransCategory> myIterator = myCategories.iterator();
while (myIterator.hasNext()) {
final MoneyWiseTransCategory myCategory = myIterator.next();
/* Only process non-deleted low-level items */
final MoneyWiseTransCategoryClass myClass = myCategory.getCategoryTypeClass();
boolean bIgnore = myCategory.isDeleted() || myClass.canParentCategory();
/* Check whether the category is allowable for the owner */
bIgnore |= !myValidator.isValidCategory(myAccount, myCategory);
if (bIgnore) {
continue;
}
/* Determine parent */
final MoneyWiseTransCategory myParent = myCategory.getParentCategory();
/* If we have a parent */
if (myParent != null) {
final String myParentName = myParent.getName();
final TethysUIScrollSubMenu<MoneyWiseTransCategory> myMenu = myMap.computeIfAbsent(myParentName, pMenu::addSubMenu);
/* Create a new MenuItem and add it to the subMenu */
myItem = myMenu.getSubMenu().addItem(myCategory, myCategory.getSubCategory());
} else {
/* Create a new MenuItem and add it to the popUp */
myItem = pMenu.addItem(myCategory);
}
/* If this is the active category */
if (myCategory.equals(myCurr)) {
/* Record it */
myActive = myItem;
}
}
/* Ensure active item is visible */
if (myActive != null) {
myActive.scrollToItem();
}
}
/**
* Build the ReturnedAccount menu for an item.
* @param pMenu the menu
* @param pEvent the event to build for
*/
public void buildReturnedAccountMenu(final TethysUIScrollMenu<MoneyWiseTransAsset> pMenu,
final MoneyWiseXAnalysisEvent pEvent) { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\controls\MoneyWiseXAnalysisSelect.java | MoneyWise Personal Finance - Core | 646 |
| net\sourceforge\joceanus\moneywise\lethe\ui\controls\MoneyWiseAnalysisSelect.java | MoneyWise Personal Finance - Core | 646 |
final MoneyWiseXAnalysisFilter<?, ?> myFilter = myPanel.getFilter();
myFilter.setCurrentAttribute(theState.getBucket());
theState.setFilter(myFilter);
}
/* Notify updated filter */
theEventManager.fireEvent(PrometheusDataEvent.SELECTIONCHANGED);
}
/**
* Create SavePoint.
*/
protected void createSavePoint() {
/* Create the savePoint */
theSavePoint = new MoneyWiseAnalysisState(theState);
}
/**
* Restore SavePoint.
*/
protected void restoreSavePoint() {
/* Restore the savePoint */
theState = new MoneyWiseAnalysisState(theSavePoint);
/* Apply the state */
theState.applyState();
}
@Override
public void setEnabled(final boolean bEnabled) {
/* If there are filters available */
if (isAvailable()) {
/* Enabled disable range selection */
theRangeButton.setEnabled(bEnabled);
/* Enable filter detail */
theFilterDetail.setVisible(true);
theFilterButton.setEnabled(bEnabled);
theColumnButton.setEnabled(bEnabled);
theBucketButton.setEnabled(bEnabled);
/* If we are disabling */
if (!bEnabled) {
/* Hide panels */
setRangeVisibility(false);
setFilterVisibility(false);
}
/* else no filters available */
} else {
/* Enabled disable range selection */
theRangeButton.setEnabled(false);
/* Hide panels */
setRangeVisibility(false);
setFilterVisibility(false);
theFilterDetail.setVisible(false);
theRangeSelect.setEnabled(bEnabled);
}
}
@Override
public void setVisible(final boolean pVisible) {
thePanel.setVisible(pVisible);
}
/**
* Is there any filter available?
* @return true/false
*/
private boolean isAvailable() {
/* Loop through the panels */
for (MoneyWiseXAnalysisFilterSelection myEntry : theMap.values()) { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\reports\MoneyWiseXReportTaxCalculation.java | MoneyWise Personal Finance - Core | 96 |
| net\sourceforge\joceanus\moneywise\lethe\reports\MoneyWiseReportTaxCalculation.java | MoneyWise Personal Finance - Core | 96 |
public Document createReport(final MoneyWiseXAnalysis pAnalysis) {
/* Access the bucket lists */
final MoneyWiseTaxAnalysis myTaxAnalysis = pAnalysis.getTaxAnalysis();
final MoneyWiseTaxYear myYear = myTaxAnalysis.getTaxYear();
/* Start the report */
final Element myBody = theBuilder.startReport();
theBuilder.makeTitle(myBody, TEXT_TITLE, theFormatter.formatObject(myYear.getYearEnd()));
/* Format the header */
final MetisHTMLTable myTable = theBuilder.startTable(myBody);
theBuilder.startHdrRow(myTable);
theBuilder.makeTitleCell(myTable, MoneyWiseStaticResource.TAXBASIS_NAME.getValue());
theBuilder.makeTitleCell(myTable, TEXT_INCOME);
theBuilder.makeTitleCell(myTable, TEXT_TAXDUE);
/* Loop through the Tax Due Buckets */
final Iterator<MoneyWiseTaxDueBucket> myTaxIterator = myTaxAnalysis.taxDueIterator();
while (myTaxIterator.hasNext()) {
final MoneyWiseTaxDueBucket myBucket = myTaxIterator.next();
/* Format the line */
theBuilder.startRow(myTable);
theBuilder.makeTableLinkCell(myTable, myBucket.getTaxBasis().toString());
theBuilder.makeValueCell(myTable, myBucket.getTaxableIncome());
theBuilder.makeValueCell(myTable, myBucket.getTaxDue());
/* Format the detail */
makeTaxReport(myTable, myBucket);
}
/* Access the Totals */
theBuilder.startTotalRow(myTable);
theBuilder.makeTotalCell(myTable, MoneyWiseXReportBuilder.TEXT_TOTAL); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\database\MoneyWiseTableDeposit.java | MoneyWise Personal Finance - Core | 90 |
| net\sourceforge\joceanus\moneywise\database\MoneyWiseTableLoan.java | MoneyWise Personal Finance - Core | 90 |
| net\sourceforge\joceanus\moneywise\database\MoneyWiseTableSecurity.java | MoneyWise Personal Finance - Core | 90 |
protected void setFieldValue(final MoneyWiseDeposit pItem,
final MetisDataFieldId iField) throws OceanusException {
/* Switch on field id */
final PrometheusTableDefinition myTableDef = getTableDef();
if (MoneyWiseBasicResource.CATEGORY_NAME.equals(iField)) {
myTableDef.setIntegerValue(iField, pItem.getCategoryId());
} else if (MoneyWiseBasicResource.ASSET_PARENT.equals(iField)) {
myTableDef.setIntegerValue(iField, pItem.getParentId());
} else if (MoneyWiseStaticDataType.CURRENCY.equals(iField)) {
myTableDef.setIntegerValue(iField, pItem.getAssetCurrencyId());
} else if (PrometheusDataResource.DATAITEM_FIELD_NAME.equals(iField)) {
myTableDef.setBinaryValue(iField, pItem.getNameBytes());
} else if (PrometheusDataResource.DATAITEM_FIELD_DESC.equals(iField)) {
myTableDef.setBinaryValue(iField, pItem.getDescBytes());
} else if (MoneyWiseBasicResource.ASSET_CLOSED.equals(iField)) {
myTableDef.setBooleanValue(iField, pItem.isClosed());
} else {
super.setFieldValue(pItem, iField);
}
}
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\bc\BouncyEdDSAKeyPair.java | GordianKnot Security Framework | 464 |
| net\sourceforge\joceanus\gordianknot\impl\bc\BouncyMLDSAKeyPair.java | GordianKnot Security Framework | 325 |
final BouncyPublicKey<?> myPublic = getKeyPair().getPublicKey();
theSigner.init(false, myPublic.getPublicKey());
}
@Override
public void update(final byte[] pBytes,
final int pOffset,
final int pLength) {
theSigner.update(pBytes, pOffset, pLength);
}
@Override
public void update(final byte pByte) {
theSigner.update(pByte);
}
@Override
public void update(final byte[] pBytes) {
theSigner.update(pBytes, 0, pBytes.length);
}
@Override
public void reset() {
theSigner.reset();
}
@Override
protected BouncyKeyPair getKeyPair() {
return (BouncyKeyPair) super.getKeyPair();
}
@Override
public BouncyFactory getFactory() {
return (BouncyFactory) super.getFactory();
}
@Override
public byte[] sign() throws GordianException {
/* Check that we are in signing mode */
checkMode(GordianSignatureMode.SIGN);
/* Sign the message */
try {
return theSigner.generateSignature();
} catch (CryptoException e) {
throw new GordianCryptoException(BouncySignature.ERROR_SIGGEN, e); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\jca\JcaKeyPairGenerator.java | GordianKnot Security Framework | 1255 |
| net\sourceforge\joceanus\gordianknot\impl\jca\JcaKeyPairGenerator.java | GordianKnot Security Framework | 1466 |
}
@Override
public JcaKeyPair generateKeyPair() {
/* Generate and return the keyPair */
final KeyPair myPair = theGenerator.generateKeyPair();
final JcaPublicKey myPublic = createPublic(myPair.getPublic());
final JcaStateAwarePrivateKey myPrivate = createPrivate(myPair.getPrivate());
return new JcaStateAwareKeyPair(myPublic, myPrivate);
}
@Override
protected JcaStateAwarePrivateKey createPrivate(final PrivateKey pPrivateKey) {
return new JcaStateAwarePrivateKey(getKeySpec(), pPrivateKey);
}
@Override
public JcaKeyPair deriveKeyPair(final X509EncodedKeySpec pPublicKey,
final PKCS8EncodedKeySpec pPrivateKey) throws GordianException {
/* Protect against exceptions */
try {
/* Check the keySpecs */
checkKeySpec(pPrivateKey);
/* derive keyPair */
final JcaPublicKey myPublic = derivePublicKey(pPublicKey);
JcaStateAwarePrivateKey myPrivate = createPrivate(getKeyFactory().generatePrivate(pPrivateKey));
final JcaKeyPair myPair = new JcaStateAwareKeyPair(myPublic, myPrivate);
/* Check that we have a matching pair */
GordianKeyPairValidity.checkValidity(getFactory(), myPair);
/* Rebuild and return the keyPair to avoid incrementing usage count */
myPrivate = createPrivate(getKeyFactory().generatePrivate(pPrivateKey));
return new JcaStateAwareKeyPair(myPublic, myPrivate);
} catch (InvalidKeySpecException e) {
throw new GordianCryptoException(PARSE_ERROR, e);
}
}
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\ext\macs\GordianBlake2XMac.java | GordianKnot Security Framework | 74 |
| net\sourceforge\joceanus\gordianknot\impl\ext\macs\GordianSkeinXMac.java | GordianKnot Security Framework | 127 |
return theXof.getDigestSize();
}
@Override
public void update(final byte in) {
theXof.update(in);
}
@Override
public void update(final byte[] in, final int inOff, final int len) {
theXof.update(in, inOff, len);
}
@Override
public int doFinal(final byte[] out, final int outOff) {
return theXof.doFinal(out, outOff);
}
@Override
public int doFinal(final byte[] out, final int outOff, final int outLen) {
return theXof.doFinal(out, outOff, outLen);
}
@Override
public int doOutput(final byte[] out, final int outOff, final int outLen) {
return theXof.doOutput(out, outOff, outLen);
}
@Override
public int getByteLength() {
return theXof.getByteLength();
}
@Override
public int getDigestSize() {
return theXof.getDigestSize();
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\reports\MoneyWiseXReportBalanceSheet.java | MoneyWise Personal Finance - Core | 458 |
| net\sourceforge\joceanus\moneywise\atlas\reports\MoneyWiseXReportNetWorth.java | MoneyWise Personal Finance - Core | 458 |
theBuilder.makeTotalCell(myTable, myValues.getMoneyValue(MoneyWiseXAnalysisSecurityAttr.VALUEDELTA));
/* Note the delayed subTable */
setDelayedTable(myName, myTable, myBucket);
}
/* Embed the table correctly */
theBuilder.embedTable(myTable, MoneyWiseBasicDataType.PORTFOLIO.getListName());
}
@Override
public MetisHTMLTable createDelayedTable(final DelayedTable pTable) {
/* Access the source */
final Object mySource = pTable.getSource();
if (mySource instanceof MoneyWiseXAnalysisDepositCategoryBucket) {
final MoneyWiseXAnalysisDepositCategoryBucket mySourceBucket = (MoneyWiseXAnalysisDepositCategoryBucket) mySource;
return createDelayedDeposit(pTable.getParent(), mySourceBucket);
} else if (mySource instanceof MoneyWiseXAnalysisCashCategoryBucket) {
final MoneyWiseXAnalysisCashCategoryBucket mySourceBucket = (MoneyWiseXAnalysisCashCategoryBucket) mySource;
return createDelayedCash(pTable.getParent(), mySourceBucket);
} else if (mySource instanceof MoneyWiseXAnalysisLoanCategoryBucket) {
final MoneyWiseXAnalysisLoanCategoryBucket mySourceBucket = (MoneyWiseXAnalysisLoanCategoryBucket) mySource;
return createDelayedLoan(pTable.getParent(), mySourceBucket);
} else if (mySource instanceof MoneyWiseXAnalysisPortfolioBucket) {
final MoneyWiseXAnalysisPortfolioBucket mySourceBucket = (MoneyWiseXAnalysisPortfolioBucket) mySource;
return createDelayedPortfolio(pTable.getParent(), mySourceBucket);
}
/* Return the null table */
return null;
}
/**
* Create a delayed deposit category table.
* @param pParent the parent table
* @param pSource the source bucket
* @return the new document fragment
*/
private MetisHTMLTable createDelayedDeposit(final MetisHTMLTable pParent,
final MoneyWiseXAnalysisDepositCategoryBucket pSource) {
/* Access the category */
final MoneyWiseXAnalysisDepositBucketList myDeposits = theAnalysis.getDeposits(); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\lethe\reports\MoneyWiseReportBalanceSheet.java | MoneyWise Personal Finance - Core | 458 |
| net\sourceforge\joceanus\moneywise\lethe\reports\MoneyWiseReportNetWorth.java | MoneyWise Personal Finance - Core | 458 |
theBuilder.makeTotalCell(myTable, myValues.getMoneyValue(MoneyWiseAnalysisSecurityAttr.VALUEDELTA));
/* Note the delayed subTable */
setDelayedTable(myName, myTable, myBucket);
}
/* Embed the table correctly */
theBuilder.embedTable(myTable, MoneyWiseBasicDataType.PORTFOLIO.getListName());
}
@Override
public MetisHTMLTable createDelayedTable(final DelayedTable pTable) {
/* Access the source */
final Object mySource = pTable.getSource();
if (mySource instanceof MoneyWiseAnalysisDepositCategoryBucket) {
final MoneyWiseAnalysisDepositCategoryBucket mySourceBucket = (MoneyWiseAnalysisDepositCategoryBucket) mySource;
return createDelayedDeposit(pTable.getParent(), mySourceBucket);
} else if (mySource instanceof MoneyWiseAnalysisCashCategoryBucket) {
final MoneyWiseAnalysisCashCategoryBucket mySourceBucket = (MoneyWiseAnalysisCashCategoryBucket) mySource;
return createDelayedCash(pTable.getParent(), mySourceBucket);
} else if (mySource instanceof MoneyWiseAnalysisLoanCategoryBucket) {
final MoneyWiseAnalysisLoanCategoryBucket mySourceBucket = (MoneyWiseAnalysisLoanCategoryBucket) mySource;
return createDelayedLoan(pTable.getParent(), mySourceBucket);
} else if (mySource instanceof MoneyWiseAnalysisPortfolioBucket) {
final MoneyWiseAnalysisPortfolioBucket mySourceBucket = (MoneyWiseAnalysisPortfolioBucket) mySource;
return createDelayedPortfolio(pTable.getParent(), mySourceBucket);
}
/* Return the null table */
return null;
}
/**
* Create a delayed deposit category table.
* @param pParent the parent table
* @param pSource the source bucket
* @return the new document fragment
*/
private MetisHTMLTable createDelayedDeposit(final MetisHTMLTable pParent,
final MoneyWiseAnalysisDepositCategoryBucket pSource) {
/* Access the category */
final MoneyWiseAnalysisDepositBucketList myDeposits = theAnalysis.getDeposits(); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\core\base\GordianDataConverter.java | GordianKnot Security Framework | 33 |
| net\sourceforge\joceanus\oceanus\convert\OceanusDataConverter.java | Oceanus Java Core Utilities | 33 |
public final class GordianDataConverter {
/**
* Invalid hexadecimal length string.
*/
private static final String ERROR_HEXLEN = "Invalid HexString Length: ";
/**
* Invalid hexadecimal error string.
*/
private static final String ERROR_HEXDIGIT = "Non Hexadecimal Value: ";
/**
* Base64 Encoding array.
*/
private static final char[] BASE64_ENCODE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".toCharArray();
/**
* Base64 Decoding array.
*/
private static final int[] BASE64_DECODE = new int[BASE64_ENCODE.length << 1];
static {
for (int i = 0; i < BASE64_ENCODE.length; i++) {
BASE64_DECODE[BASE64_ENCODE[i]] = i;
}
}
/**
* Base64 triplet size.
*/
private static final int BASE64_TRIPLE = 3;
/**
* Base64 padding character.
*/
private static final char BASE64_PAD = '=';
/**
* Base64 shift 1.
*/
private static final int BASE64_SHIFT1 = 2;
/**
* Base64 shift 2.
*/
private static final int BASE64_SHIFT2 = 4;
/**
* Base64 shift 3.
*/
private static final int BASE64_SHIFT3 = 6;
/**
* Hexadecimal Radix.
*/
public static final int HEX_RADIX = 16;
/**
* Byte shift.
*/
public static final int BYTE_SHIFT = Byte.SIZE;
/**
* Byte mask.
*/
public static final int BYTE_MASK = 0xFF;
/**
* Base64 mask.
*/
public static final int BASE64_MASK = 0x3F;
/**
* Color mask.
*/
public static final int COLOR_MASK = 0x00FFFFFF;
/**
* Nybble shift.
*/
public static final int NYBBLE_SHIFT = Byte.SIZE >> 1;
/**
* Nybble mask.
*/
public static final int NYBBLE_MASK = 0xF;
/**
* RGB colour length.
*/
public static final int RGB_LENGTH = 6;
/**
* Private constructor to avoid instantiation.
*/
private GordianDataConverter() { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSimonEngine.java | GordianKnot Security Framework | 149 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSpeckEngine.java | GordianKnot Security Framework | 103 |
}
@Override
public int getBlockSize() {
return BLOCKSIZE;
}
@Override
public int processBlock(final byte[] pInput,
final int pInOff,
final byte[] pOutput,
final int pOutOff) {
/* Check buffers */
if (pInput == null || pInput.length - pInOff < BLOCKSIZE) {
throw new IllegalArgumentException("Invalid input buffer");
}
if (pOutput == null || pOutput.length - pOutOff < BLOCKSIZE) {
throw new IllegalArgumentException("Invalid output buffer");
}
/* Perform the encryption/decryption */
return forEncryption
? encryptBlock(pInput, pInOff, pOutput, pOutOff)
: decryptBlock(pInput, pInOff, pOutput, pOutOff);
}
/**
* Encrypt a block.
* @param pInput the input buffer
* @param pInOff the input offset
* @param pOutput the output offset
* @param pOutOff the output offset
* @return the bytes processed
*/
private int encryptBlock(final byte[] pInput,
final int pInOff,
final byte[] pOutput,
final int pOutOff) {
/* Load the bytes into the block */
long myX = Pack.bigEndianToLong(pInput, pInOff);
long myY = Pack.bigEndianToLong(pInput, pInOff + Long.BYTES);
/* Loop through the rounds */
for (int i = 0; i < theRounds; i++) { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\metis\lethe\list\MetisListSetSingularMap.java | Metis Data Framework | 173 |
| net\sourceforge\joceanus\metis\lethe\list\MetisListSetUniqueMap.java | Metis Data Framework | 216 |
if (!myKey.getSingularFields().isEmpty()) {
/* Obtain the associated change */
final MetisLetheListChange<MetisFieldVersionedItem> myChange = myChanges.getListChange(myKey);
/* If there are changes */
if (myChange != null) {
/* handle changes in the base list */
processVersionChanges(myKey, myChange);
}
}
}
}
/**
* Process changes as a result of a version change.
* @param pKey the list key
* @param pChange the change event
*/
private void processVersionChanges(final MetisLetheListKey pKey,
final MetisLetheListChange<MetisFieldVersionedItem> pChange) {
/* Process deleted items */
processDeletedItems(pKey, pChange.hiddenIterator());
processDeletedItems(pKey, pChange.deletedIterator());
/* Process changed items */
processChangedItems(pKey, pChange.changedIterator());
/* Process new items */
processNewItems(pKey, pChange.addedIterator());
processNewItems(pKey, pChange.restoredIterator());
}
/**
* Process a list of new items.
* @param pKey the list key
* @param pIterator the iterator
*/
private void processNewItems(final MetisLetheListKey pKey,
final Iterator<MetisFieldVersionedItem> pIterator) {
/* Process each item in the list */
while (pIterator.hasNext()) {
final MetisFieldVersionedItem myItem = pIterator.next();
if (!myItem.isDeleted()) {
processNewItem(pKey, myItem);
}
}
}
/**
* Process newItem.
* @param pKey the list key
* @param pItem the item
*/
public void processNewItem(final MetisLetheListKey pKey,
final MetisFieldVersionedItem pItem) {
/* Obtain the singularMap for this item */
final MetisListSingularMap mySingularMap = theListMap.computeIfAbsent(pKey, x -> new MetisListSingularMap(pKey, isSession)); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\ui\panel\MoneyWiseAccountPanel.java | MoneyWise Personal Finance - Core | 283 |
| net\sourceforge\joceanus\moneywise\ui\panel\MoneyWiseCategoryPanel.java | MoneyWise Personal Finance - Core | 273 |
setChildListeners(theSecurityTable.getEventRegistrar());
}
@Override
public TethysUIComponent getUnderlying() {
return thePanel;
}
@Override
public OceanusEventRegistrar<PrometheusDataEvent> getEventRegistrar() {
return theEventManager.getEventRegistrar();
}
/**
* setChildListeners.
* @param pRegistrar the registrar
*/
private void setChildListeners(final OceanusEventRegistrar<PrometheusDataEvent> pRegistrar) {
pRegistrar.addEventListener(PrometheusDataEvent.ADJUSTVISIBILITY, e -> {
if (!isRefreshing) {
setVisibility();
}
});
pRegistrar.addEventListener(PrometheusDataEvent.GOTOWINDOW, this::handleGoToEvent);
}
@Override
public void setEnabled(final boolean pEnabled) {
theSelectButton.setEnabled(pEnabled);
theCardPanel.setEnabled(pEnabled);
theFilterCardPanel.setEnabled(pEnabled);
}
@Override
public void setVisible(final boolean pVisible) {
thePanel.setVisible(pVisible);
}
/**
* Build select menu.
*/
private void buildSelectMenu() {
/* Create builder */
final TethysUIScrollMenu<PanelName> myMenu = theSelectButton.getMenu();
/* Loop through the panels */
for (PanelName myPanel : PanelName.values()) {
/* Create a new JMenuItem for the panel */
myMenu.addItem(myPanel);
}
}
/**
* Show locked accounts.
* @param pShow true/false
*/
public void showLocked(final boolean pShow) { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\controls\MoneyWiseXLoanAnalysisSelect.java | MoneyWise Personal Finance - Core | 304 |
| net\sourceforge\joceanus\moneywise\lethe\ui\controls\MoneyWiseLoanAnalysisSelect.java | MoneyWise Personal Finance - Core | 304 |
final MoneyWiseXAnalysisLoanCategoryBucket myBucket = myIterator.next();
/* Only process low-level items */
if (myBucket.getAccountCategory().isCategoryClass(MoneyWiseLoanCategoryClass.PARENT)) {
continue;
}
/* Determine menu to add to */
final MoneyWiseLoanCategory myParent = myBucket.getAccountCategory().getParentCategory();
final String myParentName = myParent.getName();
TethysUIScrollSubMenu<MoneyWiseLoanCategory> myMenu = myMap.get(myParent.getName());
/* If this is a new menu */
if (myMenu == null) {
/* Create a new JMenu and add it to the popUp */
myMenu = theCategoryMenu.addSubMenu(myParentName);
myMap.put(myParentName, myMenu);
}
/* Create a new JMenuItem and add it to the popUp */
final MoneyWiseLoanCategory myCategory = myBucket.getAccountCategory();
final TethysUIScrollItem<MoneyWiseLoanCategory> myItem = myMenu.getSubMenu().addItem(myCategory, myCategory.getSubCategory());
/* If this is the active category */
if (myCategory.equals(myCurrent)) {
/* Record it */
myActive = myItem;
}
}
/* Ensure active item is visible */
if (myActive != null) {
myActive.scrollToItem();
}
}
/**
* Build Loan menu.
*/
private void buildLoanMenu() {
/* Reset the popUp menu */
theLoanMenu.removeAllItems();
/* Access current category and Loan */
final MoneyWiseLoanCategory myCategory = theState.getCategory();
final MoneyWiseXAnalysisLoanBucket myLoan = theState.getLoan(); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\ext\digests\GordianBlake2Xof.java | GordianKnot Security Framework | 158 |
| net\sourceforge\joceanus\gordianknot\impl\ext\digests\GordianSkeinXof.java | GordianKnot Security Framework | 163 |
return theUnderlying.getByteLength();
}
@Override
public void update(final byte b) {
singleByte[0] = b;
update(singleByte, 0, 1);
}
@Override
public void update(final byte[] pMessage,
final int pOffset,
final int pLen) {
if (theXofRemaining != -1) {
throw new IllegalStateException("Already outputting");
}
theUnderlying.update(pMessage, pOffset, pLen);
}
@Override
public int doFinal(final byte[] pOut,
final int pOutOffset) {
return doFinal(pOut, pOutOffset, getDigestSize());
}
@Override
public int doFinal(final byte[] pOut,
final int pOutOffset,
final int pOutLen) {
/* Build the required output */
final int length = doOutput(pOut, pOutOffset, pOutLen);
/* reset the underlying digest and return the length */
reset();
return length;
}
@Override
public int doOutput(final byte[] pOut,
final int pOutOffset,
final int pOutLen) {
/* If we have not created the root hash yet */
if (theRoot == null) { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\metis\lethe\list\MetisListSetNameMap.java | Metis Data Framework | 208 |
| net\sourceforge\joceanus\metis\lethe\list\MetisListSetSingularMap.java | Metis Data Framework | 173 |
| net\sourceforge\joceanus\metis\lethe\list\MetisListSetUniqueMap.java | Metis Data Framework | 216 |
if (myKey.getNameSpace() != null) {
/* Obtain the associated change */
final MetisLetheListChange<MetisFieldVersionedItem> myChange = myChanges.getListChange(myKey);
/* If there are changes */
if (myChange != null) {
/* handle changes in the base list */
processVersionChanges(myKey, myChange);
}
}
}
}
/**
* Process changes as a result of a version change.
* @param pKey the list key
* @param pChange the change event
*/
private void processVersionChanges(final MetisLetheListKey pKey,
final MetisLetheListChange<MetisFieldVersionedItem> pChange) {
/* Process deleted items */
processDeletedItems(pKey, pChange.hiddenIterator());
processDeletedItems(pKey, pChange.deletedIterator());
/* Process changed items */
processChangedItems(pKey, pChange.changedIterator());
/* Process new items */
processNewItems(pKey, pChange.addedIterator());
processNewItems(pKey, pChange.restoredIterator());
}
/**
* Process a list of new items.
* @param pKey the list key
* @param pIterator the iterator
*/
private void processNewItems(final MetisLetheListKey pKey,
final Iterator<MetisFieldVersionedItem> pIterator) {
/* Process each item in the list */
while (pIterator.hasNext()) {
final MetisFieldVersionedItem myItem = pIterator.next();
if (!myItem.isDeleted()) {
processNewItem(pKey, myItem);
}
}
}
/**
* Process newItem.
* @param pKey the list key
* @param pItem the item
*/
public void processNewItem(final MetisLetheListKey pKey,
final MetisFieldVersionedItem pItem) {
/* Obtain the nameSpace for this item */
final MetisLetheListKey myNameSpace = pKey.getNameSpace(); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\ui\panel\MoneyWiseAccountPanel.java | MoneyWise Personal Finance - Core | 248 |
| net\sourceforge\joceanus\moneywise\ui\panel\MoneyWiseCategoryPanel.java | MoneyWise Personal Finance - Core | 238 |
theFilterCardPanel.addCard(PanelName.PAYEES.toString(), thePayeeTable.getFilterPanel());
/* Create the select prompt */
final TethysUIBoxPaneManager mySelect = myPanes.newHBoxPane();
mySelect.addNode(myLabel);
mySelect.addNode(theSelectButton);
/* Create the selection panel */
theSelectPanel = myPanes.newBorderPane();
theSelectPanel.setBorderTitle(NLS_SELECT);
theSelectPanel.setWest(mySelect);
theSelectPanel.setCentre(theFilterCardPanel);
/* Create the header panel */
final TethysUIBorderPaneManager myHeader = myPanes.newBorderPane();
myHeader.setCentre(theSelectPanel);
myHeader.setNorth(theError);
myHeader.setEast(theActionButtons);
/* Now define the panel */
thePanel.setNorth(myHeader);
thePanel.setCentre(theCardPanel);
/* Hide the action buttons initially */
theActionButtons.setVisible(false);
/* Create the listeners */
theSelectButton.getEventRegistrar().addEventListener(TethysUIEvent.NEWVALUE, e -> handleSelection());
theError.getEventRegistrar().addEventListener(e -> handleErrorPane());
theActionButtons.getEventRegistrar().addEventListener(this::handleActionButtons);
setChildListeners(theDepositTable.getEventRegistrar());
setChildListeners(theCashTable.getEventRegistrar());
setChildListeners(theLoanTable.getEventRegistrar());
setChildListeners(thePayeeTable.getEventRegistrar()); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\dialog\MoneyWiseXTransactionDialog.java | MoneyWise Personal Finance - Core | 155 |
| net\sourceforge\joceanus\moneywise\lethe\ui\dialog\MoneyWiseTransactionDialog.java | MoneyWise Personal Finance - Core | 150 |
final MoneyWiseBaseTable<MoneyWiseXAnalysisEvent> pOwner) {
/* Initialise the panel */
super(pFactory, pEditSet, pOwner);
theAnalysisSelect = pAnalysisSelect;
/* Access the fieldSet */
theFieldSet = getFieldSet();
/* Build the main panel */
buildMainPanel(pFactory);
/* Build the info panel */
buildInfoPanel(pFactory);
/* Build the tax panel */
buildTaxPanel(pFactory);
/* Build the securities panel */
buildSecuritiesPanel(pFactory);
/* Build the returned panel */
buildReturnedPanel(pFactory);
}
/**
* Build Main subPanel.
* @param pFactory the GUI factory
*/
private void buildMainPanel(final TethysUIFactory<?> pFactory) {
/* Allocate fields */
final TethysUIFieldFactory myFields = pFactory.fieldFactory();
final TethysUIMoneyEditField myAmount = myFields.newMoneyField();
/* Create the buttons */
final TethysUIDateButtonField myDateButton = myFields.newDateField();
final TethysUIScrollButtonField<MoneyWiseTransAsset> myAccountButton = myFields.newScrollField(MoneyWiseTransAsset.class);
final TethysUIScrollButtonField<MoneyWiseTransAsset> myPartnerButton = myFields.newScrollField(MoneyWiseTransAsset.class);
final TethysUIScrollButtonField<MoneyWiseTransCategory> myCategoryButton = myFields.newScrollField(MoneyWiseTransCategory.class);
final TethysUIIconButtonField<Boolean> myReconciledButton = myFields.newIconField(Boolean.class);
final TethysUIIconButtonField<MoneyWiseAssetDirection> myDirectionButton = myFields.newIconField(MoneyWiseAssetDirection.class);
/* Assign the fields to the panel */
theFieldSet.addField(MoneyWiseBasicResource.MONEYWISEDATA_FIELD_DATE, myDateButton, MoneyWiseXAnalysisEvent::getDate); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\tethys\javafx\menu\TethysUIFXScrollMenu.java | Tethys JavaFX Utilities | 682 |
| net\sourceforge\joceanus\tethys\swing\menu\TethysUISwingScrollMenu.java | Tethys Java Swing Utilities | 690 |
}
@Override
public TethysUIScrollItem<T> addItem(final T pValue) {
/* Use standard name */
return addItem(pValue, pValue.toString(), null);
}
@Override
public TethysUIScrollItem<T> addItem(final T pValue,
final String pName) {
/* Use standard name */
return addItem(pValue, pName, null);
}
@Override
public TethysUIScrollItem<T> addItem(final T pValue,
final TethysUIIcon pGraphic) {
/* Use standard name */
return addItem(pValue, pValue.toString(), pGraphic);
}
@Override
public TethysUIScrollItem<T> addNullItem(final String pName) {
/* Use given name */
return addItem(null, pName, null);
}
@Override
public TethysUIScrollItem<T> addNullItem(final String pName,
final TethysUIIcon pGraphic) {
/* Use given name */
return addItem(null, pName, pGraphic);
}
@Override
public TethysUIScrollItem<T> addItem(final T pValue,
final String pName,
final TethysUIIcon pGraphic) {
/* Check state */
if (isShowing()) { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\panel\MoneyWiseXEventTable.java | MoneyWise Personal Finance - Core | 1158 |
| net\sourceforge\joceanus\moneywise\lethe\ui\panel\MoneyWiseTransactionTable.java | MoneyWise Personal Finance - Core | 1164 |
public void selectStatement(final MoneyWiseXStatementSelect pSelect) {
theTable.selectStatement(pSelect);
}
/**
* handleErrorPane.
*/
private void handleErrorPane() {
/* Determine whether we have an error */
final boolean isError = theError.hasError();
/* Hide selection panel on error */
theTable.getSelect().setVisible(!isError);
/* Lock scroll area */
theTable.setEnabled(!isError);
/* Lock Action Buttons */
theTable.getActionButtons().setEnabled(!isError);
}
/**
* handle Action Buttons.
* @param pEvent the event
*/
private void handleActionButtons(final OceanusEvent<PrometheusUIEvent> pEvent) {
/* Cancel editing */
theTable.cancelEditing();
/* Perform the command */
theEditSet.processCommand(pEvent.getEventId(), theError);
/* Adjust for changes */
theTable.notifyChanges();
}
/**
* Determine Focus.
*/
public void determineFocus() {
/* Request the focus */
theTable.determineFocus();
/* Focus on the Data entry */
theViewerAnalysis.setFocus();
}
/**
* Call underlying controls to take notice of changes in view/selection.
*/
private void notifyChanges() {
/* Notify listeners */
theEventManager.fireEvent(PrometheusDataEvent.ADJUSTVISIBILITY);
}
/**
* Does the panel have updates?
* @return true/false
*/
public boolean hasUpdates() {
return theTable.hasUpdates();
}
/**
* Does the panel have a session?
* @return true/false
*/
public boolean hasSession() {
return theTable.hasUpdates();
}
/**
* Does the panel have errors?
* @return true/false
*/
public boolean hasErrors() {
return theTable.hasErrors();
}
}
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseLoanInfoSet.java | MoneyWise Personal Finance - Core | 78 |
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWisePayeeInfoSet.java | MoneyWise Personal Finance - Core | 77 |
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWisePortfolioInfoSet.java | MoneyWise Personal Finance - Core | 77 |
return (MoneyWiseLoan) super.getOwner();
}
/**
* Obtain fieldValue for infoSet.
* @param pFieldId the fieldId
* @return the value
*/
public Object getFieldValue(final MetisDataFieldId pFieldId) {
/* Handle InfoSet fields */
final MoneyWiseAccountInfoClass myClass = getClassForField(pFieldId);
if (myClass != null) {
return getInfoSetValue(myClass);
}
/* Pass onwards */
return null;
}
/**
* Get an infoSet value.
* @param pInfoClass the class of info to get
* @return the value to set
*/
private Object getInfoSetValue(final MoneyWiseAccountInfoClass pInfoClass) {
/* Return the value */
final Object myValue = getField(pInfoClass);
return myValue != null
? myValue
: MetisDataFieldValue.SKIP;
}
/**
* Obtain the class of the field if it is an infoSet field.
* @param pField the field
* @return the class
*/
public static MoneyWiseAccountInfoClass getClassForField(final MetisDataFieldId pField) {
/* Look up field in map */
return FIELDSET_MAP.get(pField);
}
/**
* Obtain the field for the infoSet class.
* @param pClass the class
* @return the field
*/
public static MetisDataFieldId getFieldForClass(final MoneyWiseAccountInfoClass pClass) {
/* Look up field in map */
return REVERSE_FIELDMAP.get(pClass);
}
@Override
public MetisDataFieldId getFieldForClass(final PrometheusDataInfoClass pClass) {
return getFieldForClass((MoneyWiseAccountInfoClass) pClass);
}
@Override
public Iterator<PrometheusDataInfoClass> classIterator() {
final PrometheusDataInfoClass[] myValues = MoneyWiseAccountInfoClass.values();
return Arrays.stream(myValues).iterator();
}
/**
* Clone the dataInfoSet.
* @param pSource the InfoSet to clone
*/
protected void cloneDataInfoSet(final MoneyWiseLoanInfoSet pSource) { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\bc\BouncyRSAKeyPair.java | GordianKnot Security Framework | 606 |
| net\sourceforge\joceanus\gordianknot\impl\bc\BouncySM2KeyPair.java | GordianKnot Security Framework | 331 |
theEncryptor = new OAEPEncoding(pEngine, myDigest.getDigest(), PSource.PSpecified.DEFAULT.getValue());
}
@Override
protected BouncyPublicKey<?> getPublicKey() {
return (BouncyPublicKey<?>) super.getPublicKey();
}
@Override
protected BouncyPrivateKey<?> getPrivateKey() {
return (BouncyPrivateKey<?>) super.getPrivateKey();
}
@Override
public void initForEncrypt(final GordianKeyPair pKeyPair) throws GordianException {
/* Initialise underlying cipher */
BouncyKeyPair.checkKeyPair(pKeyPair);
super.initForEncrypt(pKeyPair);
/* Initialise for encryption */
final ParametersWithRandom myParms = new ParametersWithRandom(getPublicKey().getPublicKey(), getRandom());
theEncryptor.init(true, myParms);
}
@Override
public void initForDecrypt(final GordianKeyPair pKeyPair) throws GordianException {
/* Initialise underlying cipher */
BouncyKeyPair.checkKeyPair(pKeyPair);
super.initForDecrypt(pKeyPair);
/* Initialise for decryption */
theEncryptor.init(false, getPrivateKey().getPrivateKey());
}
@Override
public byte[] encrypt(final byte[] pBytes) throws GordianException { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\reports\MoneyWiseXReportNetWorth.java | MoneyWise Personal Finance - Core | 586 |
| net\sourceforge\joceanus\moneywise\atlas\reports\MoneyWiseXReportNetWorth.java | MoneyWise Personal Finance - Core | 651 |
final MoneyWiseXAnalysisCashBucket myBucket = myIterator.next();
/* Skip record if inactive or incorrect category */
if (!myBucket.isActive()
|| !MetisDataDifference.isEqual(myBucket.getCategory(), myCategory)) {
continue;
}
/* Access bucket name */
final String myName = myBucket.getName();
/* Access values */
final MoneyWiseXAnalysisAccountValues myValues = myBucket.getValues();
/* Create the detail row */
theBuilder.startRow(myTable);
theBuilder.makeFilterLinkCell(myTable, myName);
/* Handle foreign accounts */
if (isForeign) {
if (myBucket.isForeignCurrency()) {
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseXAnalysisAccountAttr.BALANCE));
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseXAnalysisAccountAttr.VALUATION));
} else {
theBuilder.makeStretchedValueCell(myTable, myValues.getMoneyValue(MoneyWiseXAnalysisAccountAttr.VALUATION));
}
} else {
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseXAnalysisAccountAttr.VALUATION));
}
/* Record the filter */
setFilterForId(myName, myBucket);
}
/* Return the table */
return myTable;
}
/**
* Create a delayed category table.
* @param pParent the parent table
* @param pSource the source bucket
* @return the new document fragment
*/
private MetisHTMLTable createDelayedLoan(final MetisHTMLTable pParent, | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\lethe\reports\MoneyWiseReportNetWorth.java | MoneyWise Personal Finance - Core | 586 |
| net\sourceforge\joceanus\moneywise\lethe\reports\MoneyWiseReportNetWorth.java | MoneyWise Personal Finance - Core | 651 |
final MoneyWiseAnalysisCashBucket myBucket = myIterator.next();
/* Skip record if inactive or incorrect category */
if (!myBucket.isActive()
|| !MetisDataDifference.isEqual(myBucket.getCategory(), myCategory)) {
continue;
}
/* Access bucket name */
final String myName = myBucket.getName();
/* Access values */
final MoneyWiseAnalysisAccountValues myValues = myBucket.getValues();
/* Create the detail row */
theBuilder.startRow(myTable);
theBuilder.makeFilterLinkCell(myTable, myName);
/* Handle foreign accounts */
if (isForeign) {
if (myBucket.isForeignCurrency()) {
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseAnalysisAccountAttr.FOREIGNVALUE));
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseAnalysisAccountAttr.VALUATION));
} else {
theBuilder.makeStretchedValueCell(myTable, myValues.getMoneyValue(MoneyWiseAnalysisAccountAttr.VALUATION));
}
} else {
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseAnalysisAccountAttr.VALUATION));
}
/* Record the filter */
setFilterForId(myName, myBucket);
}
/* Return the table */
return myTable;
}
/**
* Create a delayed category table.
* @param pParent the parent table
* @param pSource the source bucket
* @return the new document fragment
*/
private MetisHTMLTable createDelayedLoan(final MetisHTMLTable pParent, | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\lethe\reports\MoneyWiseReportMarketGrowth.java | MoneyWise Personal Finance - Core | 202 |
| net\sourceforge\joceanus\moneywise\lethe\reports\MoneyWiseReportPortfolioView.java | MoneyWise Personal Finance - Core | 168 |
checkPortfolioGrowth(myTotals);
/* Return the document */
return theBuilder.getDocument();
}
@Override
public MetisHTMLTable createDelayedTable(final DelayedTable pTable) {
/* Access the source */
final Object mySource = pTable.getSource();
if (mySource instanceof MoneyWiseAnalysisPortfolioBucket) {
final MoneyWiseAnalysisPortfolioBucket mySourceBucket = (MoneyWiseAnalysisPortfolioBucket) mySource;
return createDelayedPortfolio(pTable.getParent(), mySourceBucket);
}
/* Return the null table */
return null;
}
/**
* Create a delayed portfolio table.
* @param pParent the parent table
* @param pSource the source bucket
* @return the new document fragment
*/
private MetisHTMLTable createDelayedPortfolio(final MetisHTMLTable pParent,
final MoneyWiseAnalysisPortfolioBucket pSource) {
/* Access the securities */
final MoneyWiseAnalysisSecurityBucketList mySecurities = pSource.getSecurities();
/* Create a new table */
final MetisHTMLTable myTable = theBuilder.createEmbeddedTable(pParent);
/* Loop through the Security Buckets */
final Iterator<MoneyWiseAnalysisSecurityBucket> myIterator = mySecurities.iterator();
while (myIterator.hasNext()) {
final MoneyWiseAnalysisSecurityBucket myBucket = myIterator.next();
/* Access bucket name */
final String myName = myBucket.getSecurityName();
String myFullName = myBucket.getDecoratedName();
myFullName = myFullName.replace(':', '-');
/* Access values */
final MoneyWiseAnalysisSecurityValues myValues = myBucket.getValues(); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\reports\MoneyWiseXReportAssetGains.java | MoneyWise Personal Finance - Core | 139 |
| net\sourceforge\joceanus\moneywise\atlas\reports\MoneyWiseXReportMarketGrowth.java | MoneyWise Personal Finance - Core | 180 |
theBuilder.makeTotalCell(myTable, myValues.getMoneyValue(MoneyWiseXAnalysisSecurityAttr.REALISEDGAINS));
/* Return the document */
return theBuilder.getDocument();
}
@Override
public MetisHTMLTable createDelayedTable(final DelayedTable pTable) {
/* Access the source */
final Object mySource = pTable.getSource();
if (mySource instanceof MoneyWiseXAnalysisPortfolioBucket) {
final MoneyWiseXAnalysisPortfolioBucket mySourceBucket = (MoneyWiseXAnalysisPortfolioBucket) mySource;
return createDelayedPortfolio(pTable.getParent(), mySourceBucket);
}
/* Return the null table */
return null;
}
/**
* Create a delayed portfolio table.
* @param pParent the parent table
* @param pSource the source bucket
* @return the new document fragment
*/
private MetisHTMLTable createDelayedPortfolio(final MetisHTMLTable pParent,
final MoneyWiseXAnalysisPortfolioBucket pSource) {
/* Access the securities and portfolio */
final MoneyWiseXAnalysisSecurityBucketList mySecurities = pSource.getSecurities();
/* Create a new table */
final MetisHTMLTable myTable = theBuilder.createEmbeddedTable(pParent);
/* Loop through the Security Buckets */
final Iterator<MoneyWiseXAnalysisSecurityBucket> myIterator = mySecurities.iterator();
while (myIterator.hasNext()) {
final MoneyWiseXAnalysisSecurityBucket myBucket = myIterator.next();
/* Access bucket name */
final String myName = myBucket.getSecurityName();
String myFullName = myBucket.getDecoratedName();
myFullName = myFullName.replace(':', '-');
/* Access values */
final MoneyWiseXAnalysisSecurityValues myValues = myBucket.getValues(); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\reports\MoneyWiseXReportMarketGrowth.java | MoneyWise Personal Finance - Core | 180 |
| net\sourceforge\joceanus\moneywise\atlas\reports\MoneyWiseXReportPortfolioView.java | MoneyWise Personal Finance - Core | 168 |
theBuilder.makeTotalCell(myTable, myValues.getMoneyValue(MoneyWiseXAnalysisSecurityAttr.MARKETPROFIT));
//checkPortfolioGrowth(myTotals);
/* Return the document */
return theBuilder.getDocument();
}
@Override
public MetisHTMLTable createDelayedTable(final DelayedTable pTable) {
/* Access the source */
final Object mySource = pTable.getSource();
if (mySource instanceof MoneyWiseXAnalysisPortfolioBucket) {
final MoneyWiseXAnalysisPortfolioBucket mySourceBucket = (MoneyWiseXAnalysisPortfolioBucket) mySource;
return createDelayedPortfolio(pTable.getParent(), mySourceBucket);
}
/* Return the null table */
return null;
}
/**
* Create a delayed portfolio table.
* @param pParent the parent table
* @param pSource the source bucket
* @return the new document fragment
*/
private MetisHTMLTable createDelayedPortfolio(final MetisHTMLTable pParent,
final MoneyWiseXAnalysisPortfolioBucket pSource) {
/* Access the securities */
final MoneyWiseXAnalysisSecurityBucketList mySecurities = pSource.getSecurities();
/* Create a new table */
final MetisHTMLTable myTable = theBuilder.createEmbeddedTable(pParent);
/* Loop through the Security Buckets */
final Iterator<MoneyWiseXAnalysisSecurityBucket> myIterator = mySecurities.iterator();
while (myIterator.hasNext()) {
final MoneyWiseXAnalysisSecurityBucket myBucket = myIterator.next();
/* Access bucket name */
final String myName = myBucket.getSecurityName();
String myFullName = myBucket.getDecoratedName();
myFullName = myFullName.replace(':', '-');
/* Access values */
final MoneyWiseXAnalysisSecurityValues myValues = myBucket.getValues(); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\lethe\reports\MoneyWiseReportAssetGains.java | MoneyWise Personal Finance - Core | 139 |
| net\sourceforge\joceanus\moneywise\lethe\reports\MoneyWiseReportMarketGrowth.java | MoneyWise Personal Finance - Core | 202 |
theBuilder.makeTotalCell(myTable, myValues.getMoneyValue(MoneyWiseAnalysisSecurityAttr.REALISEDGAINS));
/* Return the document */
return theBuilder.getDocument();
}
@Override
public MetisHTMLTable createDelayedTable(final DelayedTable pTable) {
/* Access the source */
final Object mySource = pTable.getSource();
if (mySource instanceof MoneyWiseAnalysisPortfolioBucket) {
final MoneyWiseAnalysisPortfolioBucket mySourceBucket = (MoneyWiseAnalysisPortfolioBucket) mySource;
return createDelayedPortfolio(pTable.getParent(), mySourceBucket);
}
/* Return the null table */
return null;
}
/**
* Create a delayed portfolio table.
* @param pParent the parent table
* @param pSource the source bucket
* @return the new document fragment
*/
private MetisHTMLTable createDelayedPortfolio(final MetisHTMLTable pParent,
final MoneyWiseAnalysisPortfolioBucket pSource) {
/* Access the securities and portfolio */
final MoneyWiseAnalysisSecurityBucketList mySecurities = pSource.getSecurities();
/* Create a new table */
final MetisHTMLTable myTable = theBuilder.createEmbeddedTable(pParent);
/* Loop through the Security Buckets */
final Iterator<MoneyWiseAnalysisSecurityBucket> myIterator = mySecurities.iterator();
while (myIterator.hasNext()) {
final MoneyWiseAnalysisSecurityBucket myBucket = myIterator.next();
/* Access bucket name */
final String myName = myBucket.getSecurityName();
String myFullName = myBucket.getDecoratedName();
myFullName = myFullName.replace(':', '-');
/* Access values */
final MoneyWiseAnalysisSecurityValues myValues = myBucket.getValues(); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\tethys\javafx\base\TethysUIFXUtils.java | Tethys JavaFX Utilities | 353 |
| net\sourceforge\joceanus\tethys\swing\base\TethysUISwingUtils.java | Tethys Java Swing Utilities | 315 |
final Rectangle2D myScreenBounds = pScreen.getBounds();
double myAdjustX = 0;
double myAdjustY = 0;
/* Adjust for too far right */
if (pSource.getMaxX() > myScreenBounds.getMaxX()) {
myAdjustX = myScreenBounds.getMaxX() - pSource.getMaxX();
}
/* Adjust for too far down */
if (pSource.getMaxY() > myScreenBounds.getMaxY()) {
myAdjustY = myScreenBounds.getMaxY() - pSource.getMaxY();
}
/* Adjust for too far left */
if (pSource.getMinX() + myAdjustX < myScreenBounds.getMinX()) {
myAdjustX = myScreenBounds.getMinX() - pSource.getMinX();
}
/* Adjust for too far down */
if (pSource.getMinY() + myAdjustY < myScreenBounds.getMinY()) {
myAdjustY = myScreenBounds.getMinY() - pSource.getMinY();
}
/* Calculate new rectangle */
return (Double.doubleToRawLongBits(myAdjustX) != 0)
|| (Double.doubleToRawLongBits(myAdjustY) != 0)
? new Rectangle2D(pSource.getMinX() + myAdjustX, | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\ext\digests\GordianBlake2Tree.java | GordianKnot Security Framework | 478 |
| net\sourceforge\joceanus\gordianknot\impl\ext\digests\GordianSkeinTree.java | GordianKnot Security Framework | 554 |
theDigest.doFinal(theResult, 0);
myResults.addElement(Arrays.clone(theResult));
/* Return the results */
return myResults;
}
/**
* Check the leaf index.
* @param pIndex the index of the element
* @return is this the last element in the tree? true/false
*/
boolean checkLeafIndex(final int pIndex) {
/* Cannot replace leaf if not built */
if (!treeBuilt) {
throw new IllegalStateException("Tree has not been built");
}
/* Check that the index is valid */
final SimpleVector myLevel = (SimpleVector) theHashes.firstElement();
if (pIndex < 0 || pIndex >= myLevel.size()) {
throw new IllegalArgumentException("Invalid index");
}
/* Return whether this is the last index */
return pIndex == myLevel.size() - 1;
}
/**
* Replace the hash for a leaf node.
* @param pIndex the index of the element
* @param pHash the new hashValue
*/
void replaceElement(final int pIndex,
final byte[] pHash) {
/* Check that the index is correct */
final SimpleVector myLevel = (SimpleVector) theHashes.firstElement();
if (pIndex < 0 || pIndex >= myLevel.size()) {
throw new IllegalArgumentException("Invalid index");
}
/* Replace the element */
myLevel.setElementAt(Arrays.clone(pHash), pIndex);
/* Loop through the levels */
int myIndex = pIndex;
for (int i = 1; i < theHashes.size(); i++) { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\coeus\data\fundingcircle\CoeusFundingCircleTotals.java | Coeus Core Peer2Peer Analysis | 289 |
| net\sourceforge\joceanus\coeus\data\lendingworks\CoeusLendingWorksTotals.java | Coeus Core Peer2Peer Analysis | 196 |
| net\sourceforge\joceanus\coeus\data\ratesetter\CoeusRateSetterTotals.java | Coeus Core Peer2Peer Analysis | 191 |
| net\sourceforge\joceanus\coeus\data\zopa\CoeusZopaTotals.java | Coeus Core Peer2Peer Analysis | 272 |
final CoeusFundingCircleTotals myPrevious = (CoeusFundingCircleTotals) getPrevious();
if (Objects.equals(theAssetValue, myPrevious.getAssetValue())) {
theAssetValue = myPrevious.getAssetValue();
}
if (Objects.equals(theHolding, myPrevious.getHolding())) {
theHolding = myPrevious.getHolding();
}
if (Objects.equals(theLoanBook, myPrevious.getLoanBook())) {
theLoanBook = myPrevious.getLoanBook();
}
if (Objects.equals(theSourceValue, myPrevious.getSourceValue())) {
theSourceValue = myPrevious.getSourceValue();
}
if (Objects.equals(theInvested, myPrevious.getInvested())) {
theInvested = myPrevious.getInvested();
}
if (Objects.equals(theEarnings, myPrevious.getEarnings())) {
theEarnings = myPrevious.getEarnings();
}
if (Objects.equals(theTaxableEarnings, myPrevious.getTaxableEarnings())) { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\ext\macs\GordianZuc128Mac.java | GordianKnot Security Framework | 108 |
| net\sourceforge\joceanus\gordianknot\impl\ext\macs\GordianZuc256Mac.java | GordianKnot Security Framework | 119 |
for (int i = 0; i < theKeyStream.length - 1; i++) {
theKeyStream[i] = theEngine.makeKeyStreamWord();
}
theWordIndex = theKeyStream.length - 1;
theByteIndex = Integer.BYTES - 1;
}
/**
* Update the mac with a single byte.
* @param in the byte to update with
*/
public void update(final byte in) {
/* shift for next byte */
shift4NextByte();
/* Loop through the bits */
final int bitBase = theByteIndex * Byte.SIZE;
for (int bitMask = TOPBIT, bitNo = 0; bitMask > 0; bitMask >>= 1, bitNo++) {
/* If the bit is set */
if ((in & bitMask) != 0) {
/* update theMac */
updateMac(bitBase + bitNo);
}
}
}
/**
* Shift for next byte.
*/
private void shift4NextByte() {
/* Adjust the byte index */
theByteIndex = (theByteIndex + 1) % Integer.BYTES;
/* Adjust keyStream if required */
if (theByteIndex == 0) {
theKeyStream[theWordIndex] = theEngine.makeKeyStreamWord();
theWordIndex = (theWordIndex + 1) % theKeyStream.length;
}
}
/**
* Update the Mac.
* @param bitNo the bit number
*/
private void updateMac(final int bitNo) { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\reports\MoneyWiseXReportBalanceSheet.java | MoneyWise Personal Finance - Core | 529 |
| net\sourceforge\joceanus\moneywise\atlas\reports\MoneyWiseXReportBalanceSheet.java | MoneyWise Personal Finance - Core | 707 |
if (myBucket.isForeignCurrency()) {
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseXAnalysisAccountAttr.BALANCE));
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseXAnalysisAccountAttr.VALUATION));
theBuilder.makeValueCell(myTable, myBaseValues.getMoneyValue(MoneyWiseXAnalysisAccountAttr.BALANCE));
theBuilder.makeValueCell(myTable, myBaseValues.getMoneyValue(MoneyWiseXAnalysisAccountAttr.VALUATION));
} else {
theBuilder.makeStretchedValueCell(myTable, myValues.getMoneyValue(MoneyWiseXAnalysisAccountAttr.VALUATION));
theBuilder.makeStretchedValueCell(myTable, myBaseValues.getMoneyValue(MoneyWiseXAnalysisAccountAttr.VALUATION));
}
} else {
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseXAnalysisAccountAttr.VALUATION));
theBuilder.makeValueCell(myTable, myBaseValues.getMoneyValue(MoneyWiseXAnalysisAccountAttr.VALUATION));
}
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseXAnalysisAccountAttr.VALUEDELTA));
/* Record the filter */
setFilterForId(myName, myBucket); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\reports\MoneyWiseXReportBalanceSheet.java | MoneyWise Personal Finance - Core | 591 |
| net\sourceforge\joceanus\moneywise\atlas\reports\MoneyWiseXReportBalanceSheet.java | MoneyWise Personal Finance - Core | 707 |
if (myBucket.isForeignCurrency()) {
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseXAnalysisAccountAttr.BALANCE));
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseXAnalysisAccountAttr.VALUATION));
theBuilder.makeValueCell(myTable, myBaseValues.getMoneyValue(MoneyWiseXAnalysisAccountAttr.BALANCE));
theBuilder.makeValueCell(myTable, myBaseValues.getMoneyValue(MoneyWiseXAnalysisAccountAttr.VALUATION));
} else {
theBuilder.makeStretchedValueCell(myTable, myValues.getMoneyValue(MoneyWiseXAnalysisAccountAttr.VALUATION));
theBuilder.makeStretchedValueCell(myTable, myBaseValues.getMoneyValue(MoneyWiseXAnalysisAccountAttr.VALUATION));
}
} else {
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseXAnalysisAccountAttr.VALUATION));
theBuilder.makeValueCell(myTable, myBaseValues.getMoneyValue(MoneyWiseXAnalysisAccountAttr.VALUATION));
}
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseXAnalysisAccountAttr.VALUEDELTA));
/* Record the filter */
setFilterForId(myName, myBucket); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\reports\MoneyWiseXReportBalanceSheet.java | MoneyWise Personal Finance - Core | 653 |
| net\sourceforge\joceanus\moneywise\atlas\reports\MoneyWiseXReportBalanceSheet.java | MoneyWise Personal Finance - Core | 707 |
if (myBucket.isForeignCurrency()) {
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseXAnalysisAccountAttr.BALANCE));
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseXAnalysisAccountAttr.VALUATION));
theBuilder.makeValueCell(myTable, myBaseValues.getMoneyValue(MoneyWiseXAnalysisAccountAttr.BALANCE));
theBuilder.makeValueCell(myTable, myBaseValues.getMoneyValue(MoneyWiseXAnalysisAccountAttr.VALUATION));
} else {
theBuilder.makeStretchedValueCell(myTable, myValues.getMoneyValue(MoneyWiseXAnalysisAccountAttr.VALUATION));
theBuilder.makeStretchedValueCell(myTable, myBaseValues.getMoneyValue(MoneyWiseXAnalysisAccountAttr.VALUATION));
}
} else {
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseXAnalysisAccountAttr.VALUATION));
theBuilder.makeValueCell(myTable, myBaseValues.getMoneyValue(MoneyWiseXAnalysisAccountAttr.VALUATION));
}
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseXAnalysisAccountAttr.VALUEDELTA));
/* Record the filter */
setFilterForId(myName, myBucket); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\lethe\reports\MoneyWiseReportBalanceSheet.java | MoneyWise Personal Finance - Core | 529 |
| net\sourceforge\joceanus\moneywise\lethe\reports\MoneyWiseReportBalanceSheet.java | MoneyWise Personal Finance - Core | 707 |
if (myBucket.isForeignCurrency()) {
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseAnalysisAccountAttr.FOREIGNVALUE));
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseAnalysisAccountAttr.VALUATION));
theBuilder.makeValueCell(myTable, myBaseValues.getMoneyValue(MoneyWiseAnalysisAccountAttr.FOREIGNVALUE));
theBuilder.makeValueCell(myTable, myBaseValues.getMoneyValue(MoneyWiseAnalysisAccountAttr.VALUATION));
} else {
theBuilder.makeStretchedValueCell(myTable, myValues.getMoneyValue(MoneyWiseAnalysisAccountAttr.VALUATION));
theBuilder.makeStretchedValueCell(myTable, myBaseValues.getMoneyValue(MoneyWiseAnalysisAccountAttr.VALUATION));
}
} else {
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseAnalysisAccountAttr.VALUATION));
theBuilder.makeValueCell(myTable, myBaseValues.getMoneyValue(MoneyWiseAnalysisAccountAttr.VALUATION));
}
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseAnalysisAccountAttr.VALUEDELTA));
/* Record the filter */
setFilterForId(myName, myBucket); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\lethe\reports\MoneyWiseReportBalanceSheet.java | MoneyWise Personal Finance - Core | 591 |
| net\sourceforge\joceanus\moneywise\lethe\reports\MoneyWiseReportBalanceSheet.java | MoneyWise Personal Finance - Core | 707 |
if (myBucket.isForeignCurrency()) {
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseAnalysisAccountAttr.FOREIGNVALUE));
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseAnalysisAccountAttr.VALUATION));
theBuilder.makeValueCell(myTable, myBaseValues.getMoneyValue(MoneyWiseAnalysisAccountAttr.FOREIGNVALUE));
theBuilder.makeValueCell(myTable, myBaseValues.getMoneyValue(MoneyWiseAnalysisAccountAttr.VALUATION));
} else {
theBuilder.makeStretchedValueCell(myTable, myValues.getMoneyValue(MoneyWiseAnalysisAccountAttr.VALUATION));
theBuilder.makeStretchedValueCell(myTable, myBaseValues.getMoneyValue(MoneyWiseAnalysisAccountAttr.VALUATION));
}
} else {
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseAnalysisAccountAttr.VALUATION));
theBuilder.makeValueCell(myTable, myBaseValues.getMoneyValue(MoneyWiseAnalysisAccountAttr.VALUATION));
}
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseAnalysisAccountAttr.VALUEDELTA));
/* Record the filter */
setFilterForId(myName, myBucket); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\lethe\reports\MoneyWiseReportBalanceSheet.java | MoneyWise Personal Finance - Core | 653 |
| net\sourceforge\joceanus\moneywise\lethe\reports\MoneyWiseReportBalanceSheet.java | MoneyWise Personal Finance - Core | 707 |
if (myBucket.isForeignCurrency()) {
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseAnalysisAccountAttr.FOREIGNVALUE));
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseAnalysisAccountAttr.VALUATION));
theBuilder.makeValueCell(myTable, myBaseValues.getMoneyValue(MoneyWiseAnalysisAccountAttr.FOREIGNVALUE));
theBuilder.makeValueCell(myTable, myBaseValues.getMoneyValue(MoneyWiseAnalysisAccountAttr.VALUATION));
} else {
theBuilder.makeStretchedValueCell(myTable, myValues.getMoneyValue(MoneyWiseAnalysisAccountAttr.VALUATION));
theBuilder.makeStretchedValueCell(myTable, myBaseValues.getMoneyValue(MoneyWiseAnalysisAccountAttr.VALUATION));
}
} else {
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseAnalysisAccountAttr.VALUATION));
theBuilder.makeValueCell(myTable, myBaseValues.getMoneyValue(MoneyWiseAnalysisAccountAttr.VALUATION));
}
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseAnalysisAccountAttr.VALUEDELTA));
/* Record the filter */
setFilterForId(myName, myBucket); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\bc\BouncyDSTUKeyPair.java | GordianKnot Security Framework | 166 |
| net\sourceforge\joceanus\gordianknot\impl\bc\BouncyGOSTKeyPair.java | GordianKnot Security Framework | 171 |
final BCDSTU4145PrivateKey privKey = new BCDSTU4145PrivateKey(ALGO, myParms, pubKey, theSpec);
return new PKCS8EncodedKeySpec(privKey.getEncoded());
}
@Override
public BouncyKeyPair deriveKeyPair(final X509EncodedKeySpec pPublicKey,
final PKCS8EncodedKeySpec pPrivateKey) throws GordianException {
/* Check the keySpecs */
checkKeySpec(pPrivateKey);
/* derive keyPair */
final BouncyECPublicKey myPublic = derivePublicKey(pPublicKey);
final PrivateKeyInfo myInfo = PrivateKeyInfo.getInstance(pPrivateKey.getEncoded());
final ECPrivateKeyParameters myParms = deriveFromPrivKeyInfo(myInfo);
final BouncyECPrivateKey myPrivate = new BouncyECPrivateKey(getKeySpec(), myParms);
final BouncyKeyPair myPair = new BouncyKeyPair(myPublic, myPrivate);
/* Check that we have a matching pair */
GordianKeyPairValidity.checkValidity(getFactory(), myPair);
/* Return the keyPair */
return myPair;
}
@Override
public X509EncodedKeySpec getX509Encoding(final GordianKeyPair pKeyPair) throws GordianException {
/* Check the keyPair type and keySpecs */
BouncyKeyPair.checkKeyPair(pKeyPair, getKeySpec());
/* build and return the encoding */
final BouncyECPublicKey myPublicKey = (BouncyECPublicKey) getPublicKey(pKeyPair);
final ECPublicKeyParameters myParms = myPublicKey.getPublicKey();
final BCDSTU4145PublicKey pubKey = new BCDSTU4145PublicKey(ALGO, myParms, theSpec); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSimonEngine.java | GordianKnot Security Framework | 96 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSpeckEngine.java | GordianKnot Security Framework | 50 |
private static final int ROT3 = 3;
/**
* Rotate8.
*/
private static final int ROT8 = 8;
/**
* The # of rounds.
*/
private int theRounds;
/**
* The expanded key schedule.
*/
private long[] theRoundKeys;
/**
* Are we encrypting?
*/
private boolean forEncryption;
@Override
public void init(final boolean pEncrypt,
final CipherParameters pParams) {
/* Reject invalid parameters */
if (!(pParams instanceof KeyParameter)) {
throw new IllegalArgumentException("Invalid parameter passed to Speck init - "
+ pParams.getClass().getName());
}
/* Validate keyLength */
final byte[] myKey = ((KeyParameter) pParams).getKey();
final int myKeyLen = myKey.length;
if ((((myKeyLen << 1) % BLOCKSIZE) != 0)
|| myKeyLen < BLOCKSIZE
|| myKeyLen > (BLOCKSIZE << 1)) {
throw new IllegalArgumentException("KeyBitSize must be 128, 192 or 256");
}
/* Generate the round keys */
forEncryption = pEncrypt;
generateRoundKeys(myKey);
}
@Override
public void reset() {
/* NoOp */
}
@Override
public String getAlgorithmName() {
return "Simon"; | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\controls\MoneyWiseXAnalysisSelect.java | MoneyWise Personal Finance - Core | 59 |
| net\sourceforge\joceanus\moneywise\lethe\ui\controls\MoneyWiseAnalysisSelect.java | MoneyWise Personal Finance - Core | 59 |
implements OceanusEventProvider<PrometheusDataEvent>, TethysUIComponent {
/**
* Text for DateRange Label.
*/
private static final String NLS_RANGE = MoneyWiseUIResource.ANALYSIS_PROMPT_RANGE.getValue();
/**
* Text for Filter Label.
*/
private static final String NLS_FILTER = MoneyWiseUIResource.ANALYSIS_PROMPT_FILTER.getValue();
/**
* Text for FilterType Label.
*/
private static final String NLS_FILTERTYPE = MoneyWiseUIResource.ANALYSIS_PROMPT_FILTERTYPE.getValue();
/**
* Text for ColumnSet Label.
*/
private static final String NLS_COLUMNS = MoneyWiseUIResource.ANALYSIS_PROMPT_COLUMNSET.getValue();
/**
* Text for BucketType Label.
*/
private static final String NLS_BUCKET = MoneyWiseUIResource.ANALYSIS_PROMPT_BUCKET.getValue();
/**
* Text for Title.
*/
private static final String NLS_TITLE = MoneyWiseUIResource.ANALYSIS_TITLE.getValue();
/**
* Text for NoBucket.
*/
private static final String NLS_NONE = MoneyWiseUIResource.ANALYSIS_BUCKET_NONE.getValue();
/**
* Text for Title.
*/
private static final String NLS_FILTERTITLE = MoneyWiseUIResource.ANALYSIS_FILTER_TITLE.getValue();
/**
* Text for Box Title.
*/
private static final String NLS_RANGETITLE = OceanusDateResource.TITLE_BOX.getValue();
/**
* The Event Manager.
*/
private final OceanusEventManager<PrometheusDataEvent> theEventManager;
/**
* View.
*/
private final MoneyWiseView theView;
/**
* Panel.
*/
private final TethysUIBoxPaneManager thePanel;
/**
* Range Button.
*/
private final TethysUIButton theRangeButton;
/**
* Filter Button.
*/
private final TethysUIButton theFilterButton;
/**
* Filter Type Button.
*/
private final TethysUIScrollButtonManager<MoneyWiseXAnalysisType> theFilterTypeButton; | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseDeposit.java | MoneyWise Personal Finance - Core | 510 |
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseLoan.java | MoneyWise Personal Finance - Core | 473 |
setInfoSetValue(MoneyWiseAccountInfoClass.MATURITY, pMaturity);
}
/**
* Set a new SortCode.
* @param pSortCode the new sort code
* @throws OceanusException on error
*/
public void setSortCode(final char[] pSortCode) throws OceanusException {
setInfoSetValue(MoneyWiseAccountInfoClass.SORTCODE, pSortCode);
}
/**
* Set a new Account.
* @param pAccount the new account
* @throws OceanusException on error
*/
public void setAccount(final char[] pAccount) throws OceanusException {
setInfoSetValue(MoneyWiseAccountInfoClass.ACCOUNT, pAccount);
}
/**
* Set a new Reference.
* @param pReference the new reference
* @throws OceanusException on error
*/
public void setReference(final char[] pReference) throws OceanusException {
setInfoSetValue(MoneyWiseAccountInfoClass.REFERENCE, pReference);
}
/**
* Set a new Notes.
* @param pNotes the new notes
* @throws OceanusException on error
*/
public void setNotes(final char[] pNotes) throws OceanusException {
setInfoSetValue(MoneyWiseAccountInfoClass.NOTES, pNotes);
}
/**
* Set a new opening balance.
* @param pBalance the new opening balance
* @throws OceanusException on error
*/
public void setOpeningBalance(final OceanusMoney pBalance) throws OceanusException {
setInfoSetValue(MoneyWiseAccountInfoClass.OPENINGBALANCE, pBalance);
}
/**
* Set an infoSet value.
* @param pInfoClass the class of info to set
* @param pValue the value to set
* @throws OceanusException on error
*/
private void setInfoSetValue(final MoneyWiseAccountInfoClass pInfoClass,
final Object pValue) throws OceanusException {
/* Reject if there is no infoSet */
if (!hasInfoSet) {
throw new MoneyWiseLogicException(ERROR_BADINFOSET);
}
/* Set the value */
theInfoSet.setValue(pInfoClass, pValue);
}
@Override
public void adjustClosed() throws OceanusException { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseSecurityInfoSet.java | MoneyWise Personal Finance - Core | 224 |
| net\sourceforge\joceanus\moneywise\data\validate\MoneyWiseValidateSecurityInfoSet.java | MoneyWise Personal Finance - Core | 37 |
: isClassRequired(myClass);
}
@Override
public MetisFieldRequired isClassRequired(final PrometheusDataInfoClass pClass) {
/* Access details about the Security */
final MoneyWiseSecurity mySec = getOwner();
final MoneyWiseSecurityClass myType = mySec.getCategoryClass();
/* If we have no Type, no class is allowed */
if (myType == null) {
return MetisFieldRequired.NOTALLOWED;
}
/* Switch on class */
switch ((MoneyWiseAccountInfoClass) pClass) {
/* Allowed set */
case NOTES:
return MetisFieldRequired.CANEXIST;
/* Symbol */
case SYMBOL:
return myType.needsSymbol()
? MetisFieldRequired.MUSTEXIST
: MetisFieldRequired.NOTALLOWED;
/* Region */
case REGION:
return myType.needsRegion()
? MetisFieldRequired.MUSTEXIST
: MetisFieldRequired.NOTALLOWED;
/* Options */
case UNDERLYINGSTOCK:
case OPTIONPRICE:
return myType.isOption()
? MetisFieldRequired.MUSTEXIST
: MetisFieldRequired.NOTALLOWED;
/* Not Allowed */
case SORTCODE:
case ACCOUNT:
case REFERENCE:
case WEBSITE:
case CUSTOMERNO:
case USERID:
case PASSWORD:
case MATURITY:
case OPENINGBALANCE:
case AUTOEXPENSE:
case AUTOPAYEE:
default:
return MetisFieldRequired.NOTALLOWED;
}
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\ext\digests\GordianCubeHashDigest.java | GordianKnot Security Framework | 203 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianRabbitEngine.java | GordianKnot Security Framework | 198 |
}
/**
* Decode a 32-bit value from a buffer (little-endian).
*
* @param buf the input buffer
* @param off the input offset
* @return the decoded value
*/
private static int decode32le(final byte[] buf,
final int off) {
return (buf[off] & 0xFF)
| ((buf[off + 1] & 0xFF) << 8)
| ((buf[off + 2] & 0xFF) << 16)
| ((buf[off + 3] & 0xFF) << 24);
}
/**
* Encode a 32-bit value into a buffer (little-endian).
*
* @param val the value to encode
* @param buf the output buffer
* @param off the output offset
*/
private static void encode32le(final int val,
final byte[] buf,
final int off) {
buf[off] = (byte) val;
buf[off + 1] = (byte) (val >> 8);
buf[off + 2] = (byte) (val >> 16);
buf[off + 3] = (byte) (val >> 24);
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\ext\digests\GordianCubeHashDigest.java | GordianKnot Security Framework | 212 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSosemanukEngine.java | GordianKnot Security Framework | 253 |
private static int decode32le(final byte[] buf,
final int off) {
return (buf[off] & 0xFF)
| ((buf[off + 1] & 0xFF) << 8)
| ((buf[off + 2] & 0xFF) << 16)
| ((buf[off + 3] & 0xFF) << 24);
}
/**
* Encode a 32-bit value into a buffer (little-endian).
*
* @param val the value to encode
* @param buf the output buffer
* @param off the output offset
*/
private static void encode32le(final int val,
final byte[] buf,
final int off) {
buf[off] = (byte) val;
buf[off + 1] = (byte) (val >> 8);
buf[off + 2] = (byte) (val >> 16);
buf[off + 3] = (byte) (val >> 24);
}
/**
* Process a block.
*/
private void processBlock() { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianRabbitEngine.java | GordianKnot Security Framework | 207 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSosemanukEngine.java | GordianKnot Security Framework | 253 |
private static int decode32le(final byte[] buf, final int off) {
return (buf[off] & 0xFF)
| ((buf[off + 1] & 0xFF) << 8)
| ((buf[off + 2] & 0xFF) << 16)
| ((buf[off + 3] & 0xFF) << 24);
}
/**
* Encode a 32-bit value into a buffer (little-endian).
*
* @param val the value to encode
* @param buf the output buffer
* @param off the output offset
*/
private static void encode32le(final int val, final byte[] buf, final int off) {
buf[off] = (byte) val;
buf[off + 1] = (byte) (val >> 8);
buf[off + 2] = (byte) (val >> 16);
buf[off + 3] = (byte) (val >> 24);
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\reports\MoneyWiseXReportCapitalGains.java | MoneyWise Personal Finance - Core | 316 |
| net\sourceforge\joceanus\moneywise\lethe\reports\MoneyWiseReportCapitalGains.java | MoneyWise Personal Finance - Core | 310 |
private void formatValuation(final MoneyWiseXAnalysisSecurityAttr pAttr,
final Object pValue,
final OceanusUnits pUnits,
final OceanusPrice pPrice,
final OceanusRatio pXchangeRate) {
/* Ensure that we have an attribute table */
ensureAttrTable();
/* Format the attribute */
theBuilder.startRow(theAttrTable);
theBuilder.makeValueCell(theAttrTable, pAttr);
theBuilder.makeValueCell(theAttrTable, formatValuation(pUnits, pPrice, pXchangeRate));
theBuilder.makeValueCell(theAttrTable, pValue);
}
/**
* Format a valuation.
* @param pUnits the units
* @param pPrice the price
* @param pXchangeRate the exchange rate
* @return the formatted valuation
*/
private String formatValuation(final OceanusUnits pUnits,
final OceanusPrice pPrice,
final OceanusRatio pXchangeRate) {
theStringBuilder.setLength(0);
theStringBuilder.append(theFormatter.formatObject(pUnits));
theStringBuilder.append('@');
theStringBuilder.append(theFormatter.formatObject(pPrice));
if (pXchangeRate != null) {
theStringBuilder.append('/');
theStringBuilder.append(theFormatter.formatObject(pXchangeRate));
}
return theStringBuilder.toString();
}
/**
* Format a multiplication.
* @param pAttr the attribute
* @param pValue the value
* @param pFirst the first item
* @param pSecond the second item
*/
private void formatMultiplication(final MoneyWiseXAnalysisSecurityAttr pAttr, | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\ui\panel\MoneyWiseMarketPricesTable.java | MoneyWise Personal Finance - Core | 363 |
| net\sourceforge\joceanus\moneywise\ui\panel\MoneyWiseMarketRatesTable.java | MoneyWise Personal Finance - Core | 347 |
theTable = new MoneyWiseMarketPricesTable(pView, theEditSet, theError);
/* Create the action buttons */
final TethysUIFactory<?> myGuiFactory = pView.getGuiFactory();
theActionButtons = new PrometheusActionButtons(myGuiFactory, theEditSet);
theActionButtons.setVisible(false);
/* Create the header panel */
final TethysUIPaneFactory myPanes = myGuiFactory.paneFactory();
final TethysUIBorderPaneManager myHeader = myPanes.newBorderPane();
myHeader.setCentre(theTable.getSelect());
myHeader.setNorth(theError);
myHeader.setEast(theActionButtons);
/* Create the panel */
thePanel = myPanes.newBorderPane();
thePanel.setNorth(myHeader);
thePanel.setCentre(theTable);
/* Add listeners */
theError.getEventRegistrar().addEventListener(e -> handleErrorPane());
theActionButtons.getEventRegistrar().addEventListener(this::handleActionButtons);
theTable.getEventRegistrar().addEventListener(e -> notifyChanges());
}
@Override
public TethysUIComponent getUnderlying() {
return thePanel;
}
@Override
public OceanusEventRegistrar<PrometheusDataEvent> getEventRegistrar() { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\controls\MoneyWiseXCashAnalysisSelect.java | MoneyWise Personal Finance - Core | 309 |
| net\sourceforge\joceanus\moneywise\lethe\ui\controls\MoneyWiseCashAnalysisSelect.java | MoneyWise Personal Finance - Core | 309 |
final MoneyWiseXAnalysisCashCategoryBucket myBucket = myIterator.next();
/* Only process low-level items */
if (myBucket.getAccountCategory().isCategoryClass(MoneyWiseCashCategoryClass.PARENT)) {
continue;
}
/* Determine menu to add to */
final MoneyWiseCashCategory myParent = myBucket.getAccountCategory().getParentCategory();
final String myParentName = myParent.getName();
final TethysUIScrollSubMenu<MoneyWiseCashCategory> myMenu = myMap.computeIfAbsent(myParentName, theCategoryMenu::addSubMenu);
/* Create a new JMenuItem and add it to the popUp */
final MoneyWiseCashCategory myCategory = myBucket.getAccountCategory();
final TethysUIScrollItem<MoneyWiseCashCategory> myItem = myMenu.getSubMenu().addItem(myCategory, myCategory.getSubCategory());
/* If this is the active category */
if (myCategory.equals(myCurrent)) {
/* Record it */
myActive = myItem;
}
}
/* Ensure active item is visible */
if (myActive != null) {
myActive.scrollToItem();
}
}
/**
* Build Cash menu.
*/
private void buildCashMenu() {
/* Reset the popUp menu */
theCashMenu.removeAllItems();
/* Access current category and Account */
final MoneyWiseCashCategory myCategory = theState.getCategory();
final MoneyWiseXAnalysisCashBucket myCash = theState.getCash(); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\controls\MoneyWiseXDepositAnalysisSelect.java | MoneyWise Personal Finance - Core | 304 |
| net\sourceforge\joceanus\moneywise\lethe\ui\controls\MoneyWiseDepositAnalysisSelect.java | MoneyWise Personal Finance - Core | 304 |
final MoneyWiseXAnalysisDepositCategoryBucket myBucket = myIterator.next();
/* Only process low-level items */
if (myBucket.getAccountCategory().isCategoryClass(MoneyWiseDepositCategoryClass.PARENT)) {
continue;
}
/* Determine menu to add to */
final MoneyWiseDepositCategory myParent = myBucket.getAccountCategory().getParentCategory();
final String myParentName = myParent.getName();
final TethysUIScrollSubMenu<MoneyWiseDepositCategory> myMenu = myMap.computeIfAbsent(myParentName, theCategoryMenu::addSubMenu);
/* Create a new JMenuItem and add it to the popUp */
final MoneyWiseDepositCategory myCategory = myBucket.getAccountCategory();
final TethysUIScrollItem<MoneyWiseDepositCategory> myItem = myMenu.getSubMenu().addItem(myCategory, myCategory.getSubCategory());
/* If this is the active category */
if (myCategory.equals(myCurrent)) {
/* Record it */
myActive = myItem;
}
}
/* Ensure active item is visible */
if (myActive != null) {
myActive.scrollToItem();
}
}
/**
* Build Deposit menu.
*/
private void buildDepositMenu() {
/* Reset the popUp menu */
theDepositMenu.removeAllItems();
/* Access current category */
final MoneyWiseDepositCategory myCategory = theState.getCategory();
final MoneyWiseXAnalysisDepositBucket myDeposit = theState.getDeposit(); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseDeposit.java | MoneyWise Personal Finance - Core | 208 |
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseLoan.java | MoneyWise Personal Finance - Core | 195 |
? theInfoSet.getValue(MoneyWiseAccountInfoClass.MATURITY, OceanusDate.class)
: null;
}
/**
* Obtain SortCode.
* @return the sort code
*/
public char[] getSortCode() {
return hasInfoSet
? theInfoSet.getValue(MoneyWiseAccountInfoClass.SORTCODE, char[].class)
: null;
}
/**
* Obtain Reference.
* @return the reference
*/
public char[] getReference() {
return hasInfoSet
? theInfoSet.getValue(MoneyWiseAccountInfoClass.REFERENCE, char[].class)
: null;
}
/**
* Obtain Account.
* @return the account
*/
public char[] getAccount() {
return hasInfoSet
? theInfoSet.getValue(MoneyWiseAccountInfoClass.ACCOUNT, char[].class)
: null;
}
/**
* Obtain Notes.
* @return the notes
*/
public char[] getNotes() {
return hasInfoSet
? theInfoSet.getValue(MoneyWiseAccountInfoClass.NOTES, char[].class)
: null;
}
@Override
public OceanusMoney getOpeningBalance() {
return hasInfoSet
? theInfoSet.getValue(MoneyWiseAccountInfoClass.OPENINGBALANCE, OceanusMoney.class)
: null;
}
@Override
public MoneyWiseDepositCategory getCategory() { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\bc\BouncyDSTUKeyPair.java | GordianKnot Security Framework | 142 |
| net\sourceforge\joceanus\gordianknot\impl\bc\BouncyGOSTKeyPair.java | GordianKnot Security Framework | 147 |
new ECDomainParameters(myCurve, myG, theSpec.getOrder(), BigInteger.valueOf(theSpec.getCofactor())), getRandom());
theGenerator.init(myParams);
}
@Override
public BouncyKeyPair generateKeyPair() {
/* Generate and return the keyPair */
final AsymmetricCipherKeyPair myPair = theGenerator.generateKeyPair();
final BouncyECPublicKey myPublic = new BouncyECPublicKey(getKeySpec(), (ECPublicKeyParameters) myPair.getPublic());
final BouncyECPrivateKey myPrivate = new BouncyECPrivateKey(getKeySpec(), (ECPrivateKeyParameters) myPair.getPrivate());
return new BouncyKeyPair(myPublic, myPrivate);
}
@Override
public PKCS8EncodedKeySpec getPKCS8Encoding(final GordianKeyPair pKeyPair) throws GordianException {
/* Check the keyPair type and keySpecs */
BouncyKeyPair.checkKeyPair(pKeyPair, getKeySpec());
/* build and return the encoding */
final BouncyECPrivateKey myPrivateKey = (BouncyECPrivateKey) getPrivateKey(pKeyPair);
final ECPrivateKeyParameters myParms = myPrivateKey.getPrivateKey();
final BouncyECPublicKey myPublicKey = (BouncyECPublicKey) getPublicKey(pKeyPair);
final ECPublicKeyParameters myPubParms = myPublicKey.getPublicKey();
final BCDSTU4145PublicKey pubKey = new BCDSTU4145PublicKey(ALGO, myPubParms, theSpec); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSnow3GEngine.java | GordianKnot Security Framework | 409 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSnow3GEngine.java | GordianKnot Security Framework | 438 |
^ (f)
);
lfsrState[0] = lfsrState[1];
lfsrState[1] = lfsrState[2];
lfsrState[2] = lfsrState[3];
lfsrState[3] = lfsrState[4];
lfsrState[4] = lfsrState[5];
lfsrState[5] = lfsrState[6];
lfsrState[6] = lfsrState[7];
lfsrState[7] = lfsrState[8];
lfsrState[8] = lfsrState[9];
lfsrState[9] = lfsrState[10];
lfsrState[10] = lfsrState[11];
lfsrState[11] = lfsrState[12];
lfsrState[12] = lfsrState[13];
lfsrState[13] = lfsrState[14];
lfsrState[14] = lfsrState[15];
lfsrState[15] = v;
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\controls\MoneyWiseXPayeeAnalysisSelect.java | MoneyWise Personal Finance - Core | 94 |
| net\sourceforge\joceanus\moneywise\lethe\ui\controls\MoneyWisePayeeAnalysisSelect.java | MoneyWise Personal Finance - Core | 94 |
theButton = pFactory.buttonFactory().newScrollButton(MoneyWiseXAnalysisPayeeBucket.class);
/* Create Event Manager */
theEventManager = new OceanusEventManager<>();
/* Create the label */
final TethysUILabel myLabel = pFactory.controlFactory().newLabel(NLS_PAYEE + TethysUIConstant.STR_COLON);
/* Define the layout */
thePanel = pFactory.paneFactory().newHBoxPane();
thePanel.addSpacer();
thePanel.addNode(myLabel);
thePanel.addNode(theButton);
/* Create initial state */
theState = new MoneyWisePayeeState();
theState.applyState();
/* Access the menus */
thePayeeMenu = theButton.getMenu();
/* Create the listeners */
final OceanusEventRegistrar<TethysUIEvent> myRegistrar = theButton.getEventRegistrar();
myRegistrar.addEventListener(TethysUIEvent.NEWVALUE, e -> handleNewPayee());
theButton.setMenuConfigurator(e -> buildPayeeMenu());
}
@Override
public TethysUIComponent getUnderlying() {
return thePanel;
}
@Override
public OceanusEventRegistrar<PrometheusDataEvent> getEventRegistrar() {
return theEventManager.getEventRegistrar();
}
@Override
public MoneyWiseXAnalysisPayeeFilter getFilter() { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\controls\MoneyWiseXPortfolioAnalysisSelect.java | MoneyWise Personal Finance - Core | 94 |
| net\sourceforge\joceanus\moneywise\lethe\ui\controls\MoneyWisePortfolioAnalysisSelect.java | MoneyWise Personal Finance - Core | 94 |
thePortButton = pFactory.buttonFactory().newScrollButton(MoneyWiseXAnalysisPortfolioBucket.class);
/* Create Event Manager */
theEventManager = new OceanusEventManager<>();
/* Create the labels */
final TethysUILabel myPortLabel = pFactory.controlFactory().newLabel(NLS_PORTFOLIO + TethysUIConstant.STR_COLON);
/* Define the layout */
thePanel = pFactory.paneFactory().newHBoxPane();
thePanel.addSpacer();
thePanel.addNode(myPortLabel);
thePanel.addNode(thePortButton);
/* Create initial state */
theState = new MoneyWisePortfolioState();
theState.applyState();
/* Access the menus */
thePortfolioMenu = thePortButton.getMenu();
/* Create the listeners */
final OceanusEventRegistrar<TethysUIEvent> myRegistrar = thePortButton.getEventRegistrar();
myRegistrar.addEventListener(TethysUIEvent.NEWVALUE, e -> handleNewPortfolio());
thePortButton.setMenuConfigurator(e -> buildPortfolioMenu());
}
@Override
public TethysUIComponent getUnderlying() {
return thePanel;
}
@Override
public OceanusEventRegistrar<PrometheusDataEvent> getEventRegistrar() {
return theEventManager.getEventRegistrar();
}
@Override
public MoneyWiseXAnalysisPortfolioCashFilter getFilter() { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\controls\MoneyWiseXTransCategoryAnalysisSelect.java | MoneyWise Personal Finance - Core | 99 |
| net\sourceforge\joceanus\moneywise\lethe\ui\controls\MoneyWiseTransCategoryAnalysisSelect.java | MoneyWise Personal Finance - Core | 99 |
theButton = pFactory.buttonFactory().newScrollButton(MoneyWiseXAnalysisTransCategoryBucket.class);
/* Create the label */
final TethysUILabel myLabel = pFactory.controlFactory().newLabel(NLS_CATEGORY + TethysUIConstant.STR_COLON);
/* Create Event Manager */
theEventManager = new OceanusEventManager<>();
/* Define the layout */
thePanel = pFactory.paneFactory().newHBoxPane();
thePanel.addSpacer();
thePanel.addNode(myLabel);
thePanel.addNode(theButton);
/* Create initial state */
theState = new MoneyWiseEventState();
theState.applyState();
/* Access the menus */
theCategoryMenu = theButton.getMenu();
/* Create the listeners */
final OceanusEventRegistrar<TethysUIEvent> myRegistrar = theButton.getEventRegistrar();
myRegistrar.addEventListener(TethysUIEvent.NEWVALUE, e -> handleNewCategory());
theButton.setMenuConfigurator(e -> buildCategoryMenu());
}
@Override
public TethysUIComponent getUnderlying() {
return thePanel;
}
@Override
public OceanusEventRegistrar<PrometheusDataEvent> getEventRegistrar() {
return theEventManager.getEventRegistrar();
}
@Override
public MoneyWiseXAnalysisTransCategoryFilter getFilter() { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\controls\MoneyWiseXTransTagSelect.java | MoneyWise Personal Finance - Core | 94 |
| net\sourceforge\joceanus\moneywise\lethe\ui\controls\MoneyWiseTransTagSelect.java | MoneyWise Personal Finance - Core | 94 |
theTagButton = pFactory.buttonFactory().newScrollButton(MoneyWiseXAnalysisTransTagBucket.class);
/* Create Event Manager */
theEventManager = new OceanusEventManager<>();
/* Create the label */
final TethysUILabel myTagLabel = pFactory.controlFactory().newLabel(NLS_TAG + TethysUIConstant.STR_COLON);
/* Define the layout */
thePanel = pFactory.paneFactory().newHBoxPane();
thePanel.addSpacer();
thePanel.addNode(myTagLabel);
thePanel.addNode(theTagButton);
/* Create initial state */
theState = new MoneyWiseTagState();
theState.applyState();
/* Create the listener */
final OceanusEventRegistrar<TethysUIEvent> myRegistrar = theTagButton.getEventRegistrar();
myRegistrar.addEventListener(TethysUIEvent.NEWVALUE, e -> handleNewTag());
theTagButton.setMenuConfigurator(e -> buildTagMenu());
theTagMenu = theTagButton.getMenu();
}
@Override
public TethysUIComponent getUnderlying() {
return thePanel;
}
@Override
public OceanusEventRegistrar<PrometheusDataEvent> getEventRegistrar() {
return theEventManager.getEventRegistrar();
}
@Override
public MoneyWiseXAnalysisTagFilter getFilter() { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\tethys\swing\dialog\TethysUISwingAboutBox.java | Tethys Java Swing Utilities | 49 |
| net\sourceforge\joceanus\tethys\swing\dialog\TethysUISwingBusySpinner.java | Tethys Java Swing Utilities | 49 |
TethysUISwingAboutBox(final TethysUICoreFactory<?> pFactory,
final JFrame pFrame) {
/* Initialise underlying class */
super(pFactory);
if (pFrame == null) {
throw new IllegalArgumentException("Cannot create Dialog during initialisation");
}
/* Store parameters */
theFrame = pFrame;
}
@Override
public TethysUISwingNode getNode() {
return (TethysUISwingNode) super.getNode();
}
@Override
public void setPreferredWidth(final Integer pWidth) {
getNode().setPreferredWidth(pWidth);
}
@Override
public void setPreferredHeight(final Integer pHeight) {
getNode().setPreferredHeight(pHeight);
}
@Override
public void showDialog() {
/* If we have not made the dialog yet */
if (theDialog == null) {
makeDialog();
}
/* Show the dialog */
theDialog.setVisible(true);
}
/**
* Make the dialog.
*/
private void makeDialog() {
/* Create the dialog */
theDialog = new JDialog(theFrame);
theDialog.setUndecorated(true);
theDialog.setModalityType(ModalityType.APPLICATION_MODAL); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\ext\digests\GordianJHDigest.java | GordianKnot Security Framework | 685 |
| net\sourceforge\joceanus\gordianknot\impl\ext\digests\GordianJHDigest.java | GordianKnot Security Framework | 713 |
buffer[63] = (byte) (databitlen & 0xff);
buffer[62] = (byte) ((databitlen >> 8) & 0xff);
buffer[61] = (byte) ((databitlen >> 16) & 0xff);
buffer[60] = (byte) ((databitlen >> 24) & 0xff);
buffer[59] = (byte) ((databitlen >> 32) & 0xff);
buffer[58] = (byte) ((databitlen >> 40) & 0xff);
buffer[57] = (byte) ((databitlen >> 48) & 0xff);
buffer[56] = (byte) ((databitlen >> 56) & 0xff);
f8();
} else { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\dialog\MoneyWiseXTransactionDialog.java | MoneyWise Personal Finance - Core | 269 |
| net\sourceforge\joceanus\moneywise\lethe\ui\dialog\MoneyWiseTransactionDialog.java | MoneyWise Personal Finance - Core | 267 |
theFieldSet.addField(MoneyWiseTransInfoClass.WITHHELD, myWithheld, MoneyWiseXAnalysisEvent::getWithheld);
/* Set currency */
myTaxCredit.setDeemedCurrency(() -> getItem().getAccount().getCurrency());
myEeNatIns.setDeemedCurrency(() -> getItem().getAccount().getCurrency());
myErNatIns.setDeemedCurrency(() -> getItem().getAccount().getCurrency());
myBenefit.setDeemedCurrency(() -> getItem().getAccount().getCurrency());
myWithheld.setDeemedCurrency(() -> getItem().getAccount().getCurrency());
}
/**
* Build securities subPanel.
* @param pFactory the GUI factory
*/
private void buildSecuritiesPanel(final TethysUIFactory<?> pFactory) {
/* Create a new panel */
theFieldSet.newPanel(TAB_SECURITIES);
/* Allocate fields */
final TethysUIFieldFactory myFields = pFactory.fieldFactory();
final TethysUIUnitsEditField myAccountUnits = myFields.newUnitsField();
final TethysUIUnitsEditField myPartnerUnits = myFields.newUnitsField();
final TethysUIRatioEditField myDilution = myFields.newRatioField(); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWisePayeeInfoSet.java | MoneyWise Personal Finance - Core | 157 |
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWisePortfolioInfoSet.java | MoneyWise Personal Finance - Core | 156 |
for (MoneyWisePayeeInfo myInfo : this) {
myInfo.resolveEditSetLinks(pEditSet);
}
}
/**
* Determine if a field is required.
* @param pField the infoSet field
* @return the status
*/
public MetisFieldRequired isFieldRequired(final MetisDataFieldId pField) {
final MoneyWiseAccountInfoClass myClass = getClassForField(pField);
return myClass == null
? MetisFieldRequired.NOTALLOWED
: isClassRequired(myClass);
}
@Override
public MetisFieldRequired isClassRequired(final PrometheusDataInfoClass pClass) {
/* Switch on class */
switch ((MoneyWiseAccountInfoClass) pClass) {
/* Allowed set */
case NOTES:
case SORTCODE:
case ACCOUNT:
case REFERENCE:
case WEBSITE:
case CUSTOMERNO:
case USERID:
case PASSWORD:
return MetisFieldRequired.CANEXIST;
/* Not allowed */
case MATURITY:
case OPENINGBALANCE:
case AUTOEXPENSE:
case AUTOPAYEE:
case SYMBOL:
case REGION:
case UNDERLYINGSTOCK:
case OPTIONPRICE:
default:
return MetisFieldRequired.NOTALLOWED;
}
}
/**
* Validate the infoSet.
*/
protected void validate() {
/* Loop through the classes */
for (final MoneyWiseAccountInfoClass myClass : MoneyWiseAccountInfoClass.values()) {
/* Access info for class */
final MoneyWisePayeeInfo myInfo = getInfo(myClass); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianBlake2XEngine.java | GordianKnot Security Framework | 121 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianBlake3Engine.java | GordianKnot Security Framework | 115 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSkeinXofEngine.java | GordianKnot Security Framework | 122 |
return theBlake2X.getAlgorithmName();
}
@Override
public int processBytes(final byte[] in,
final int inOff,
final int len,
final byte[] out,
final int outOff) {
/* Check for errors */
if (theResetState == null) {
throw new IllegalStateException(getAlgorithmName() + " not initialised");
}
if ((inOff + len) > in.length) {
throw new DataLengthException("input buffer too short");
}
if ((outOff + len) > out.length) {
throw new OutputLengthException("output buffer too short");
}
/* Loop through the input bytes */
for (int i = 0; i < len; i++) {
out[i + outOff] = returnByte(in[i + inOff]);
}
return len;
}
@Override
public void reset() {
if (theResetState != null) { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\reports\MoneyWiseXReportBalanceSheet.java | MoneyWise Personal Finance - Core | 309 |
| net\sourceforge\joceanus\moneywise\atlas\reports\MoneyWiseXReportBalanceSheet.java | MoneyWise Personal Finance - Core | 356 |
| net\sourceforge\joceanus\moneywise\atlas\reports\MoneyWiseXReportBalanceSheet.java | MoneyWise Personal Finance - Core | 403 |
final MoneyWiseDepositCategory myCurr = myBucket.getAccountCategory();
if (!MetisDataDifference.isEqual(myCurr.getParentCategory(), myCategory)) {
continue;
}
/* Access bucket name */
final String myName = myBucket.getName();
/* Access values */
final MoneyWiseXAnalysisAccountValues myValues = myBucket.getValues();
final MoneyWiseXAnalysisAccountValues myBaseValues = myBucket.getBaseValues();
/* Create the SubCategory row */
theBuilder.startRow(myTable);
theBuilder.makeDelayLinkCell(myTable, myName, myCurr.getSubCategory());
theBuilder.makeTotalCell(myTable, myValues.getMoneyValue(MoneyWiseXAnalysisAccountAttr.VALUATION));
theBuilder.makeTotalCell(myTable, myBaseValues.getMoneyValue(MoneyWiseXAnalysisAccountAttr.VALUATION));
theBuilder.makeTotalCell(myTable, myValues.getMoneyValue(MoneyWiseXAnalysisAccountAttr.VALUEDELTA));
/* Note the delayed subTable */
setDelayedTable(myName, myTable, myBucket);
}
/* Embed the table correctly */
theBuilder.embedTable(myTable, pCategory.getName());
}
/**
* Build a category report.
* @param pParent the table parent
* @param pCategory the category bucket
*/
private void makeCashCategoryReport(final MetisHTMLTable pParent, | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\lethe\reports\MoneyWiseReportBalanceSheet.java | MoneyWise Personal Finance - Core | 309 |
| net\sourceforge\joceanus\moneywise\lethe\reports\MoneyWiseReportBalanceSheet.java | MoneyWise Personal Finance - Core | 356 |
| net\sourceforge\joceanus\moneywise\lethe\reports\MoneyWiseReportBalanceSheet.java | MoneyWise Personal Finance - Core | 403 |
final MoneyWiseDepositCategory myCurr = myBucket.getAccountCategory();
if (!MetisDataDifference.isEqual(myCurr.getParentCategory(), myCategory)) {
continue;
}
/* Access bucket name */
final String myName = myBucket.getName();
/* Access values */
final MoneyWiseAnalysisAccountValues myValues = myBucket.getValues();
final MoneyWiseAnalysisAccountValues myBaseValues = myBucket.getBaseValues();
/* Create the SubCategory row */
theBuilder.startRow(myTable);
theBuilder.makeDelayLinkCell(myTable, myName, myCurr.getSubCategory());
theBuilder.makeTotalCell(myTable, myValues.getMoneyValue(MoneyWiseAnalysisAccountAttr.VALUATION));
theBuilder.makeTotalCell(myTable, myBaseValues.getMoneyValue(MoneyWiseAnalysisAccountAttr.VALUATION));
theBuilder.makeTotalCell(myTable, myValues.getMoneyValue(MoneyWiseAnalysisAccountAttr.VALUEDELTA));
/* Note the delayed subTable */
setDelayedTable(myName, myTable, myBucket);
}
/* Embed the table correctly */
theBuilder.embedTable(myTable, pCategory.getName());
}
/**
* Build a category report.
* @param pParent the table parent
* @param pCategory the category bucket
*/
private void makeCashCategoryReport(final MetisHTMLTable pParent, | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSnow3GEngine.java | GordianKnot Security Framework | 410 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianZuc128Engine.java | GordianKnot Security Framework | 331 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianZuc128Engine.java | GordianKnot Security Framework | 366 |
);
lfsrState[0] = lfsrState[1];
lfsrState[1] = lfsrState[2];
lfsrState[2] = lfsrState[3];
lfsrState[3] = lfsrState[4];
lfsrState[4] = lfsrState[5];
lfsrState[5] = lfsrState[6];
lfsrState[6] = lfsrState[7];
lfsrState[7] = lfsrState[8];
lfsrState[8] = lfsrState[9];
lfsrState[9] = lfsrState[10];
lfsrState[10] = lfsrState[11];
lfsrState[11] = lfsrState[12];
lfsrState[12] = lfsrState[13];
lfsrState[13] = lfsrState[14];
lfsrState[14] = lfsrState[15];
lfsrState[15] = v; | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSnow3GEngine.java | GordianKnot Security Framework | 439 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianZuc128Engine.java | GordianKnot Security Framework | 331 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianZuc128Engine.java | GordianKnot Security Framework | 366 |
);
lfsrState[0] = lfsrState[1];
lfsrState[1] = lfsrState[2];
lfsrState[2] = lfsrState[3];
lfsrState[3] = lfsrState[4];
lfsrState[4] = lfsrState[5];
lfsrState[5] = lfsrState[6];
lfsrState[6] = lfsrState[7];
lfsrState[7] = lfsrState[8];
lfsrState[8] = lfsrState[9];
lfsrState[9] = lfsrState[10];
lfsrState[10] = lfsrState[11];
lfsrState[11] = lfsrState[12];
lfsrState[12] = lfsrState[13];
lfsrState[13] = lfsrState[14];
lfsrState[14] = lfsrState[15];
lfsrState[15] = v; | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\ui\dialog\MoneyWiseLoanDialog.java | MoneyWise Personal Finance - Core | 125 |
| net\sourceforge\joceanus\moneywise\ui\dialog\MoneyWisePortfolioDialog.java | MoneyWise Personal Finance - Core | 123 |
myCategoryButton.setMenuConfigurator(c -> buildCategoryMenu(c, getItem()));
myParentButton.setMenuConfigurator(c -> buildParentMenu(c, getItem()));
myCurrencyButton.setMenuConfigurator(c -> buildCurrencyMenu(c, getItem()));
final Map<Boolean, TethysUIIconMapSet<Boolean>> myMapSets = MoneyWiseIcon.configureLockedIconButton(pFactory);
myClosedButton.setIconMapSet(() -> myMapSets.get(theClosedState));
/* Configure validation checks */
myName.setValidator(this::isValidName);
myDesc.setValidator(this::isValidDesc);
}
/**
* Build account subPanel.
* @param pFactory the GUI factory
*/
private void buildAccountPanel(final TethysUIFactory<?> pFactory) {
/* Create a new panel */
theFieldSet.newPanel(TAB_ACCOUNT);
/* Allocate fields */
final TethysUIFieldFactory myFields = pFactory.fieldFactory();
final TethysUICharArrayEditField mySortCode = myFields.newCharArrayField();
final TethysUICharArrayEditField myAccount = myFields.newCharArrayField();
final TethysUICharArrayEditField myReference = myFields.newCharArrayField(); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\coeus\data\fundingcircle\CoeusFundingCircleLoader.java | Coeus Core Peer2Peer Analysis | 103 |
| net\sourceforge\joceanus\coeus\data\lendingworks\CoeusLendingWorksLoader.java | Coeus Core Peer2Peer Analysis | 83 |
theBasePath = mySystem.getPath(myPath);
}
/**
* Obtain sorted list of statements.
* @return the list of statements
* @throws OceanusException on error
*/
private List<StatementRecord> listStatements() throws OceanusException {
/* Create list and formatter */
final List<StatementRecord> myList = new ArrayList<>();
final DateTimeFormatter myFormatter = DateTimeFormatter.ofPattern(DATEPATTERN);
/* Loop through statement file in the directory */
try (DirectoryStream<Path> myStream = Files.newDirectoryStream(theBasePath, MASK)) {
for (final Path myFile : myStream) {
/* Skip null entries */
final Path myFileName = myFile.getFileName();
if (myFileName == null) {
continue;
}
/* Parse the file name */
final String myName = myFileName.toString();
String myBase = myName.substring(0, myName.length() - SUFFIX.length());
myBase = myBase.substring(PREFIX.length());
final TemporalAccessor myTA = myFormatter.parse(myBase); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\reports\MoneyWiseXReportCapitalGains.java | MoneyWise Personal Finance - Core | 423 |
| net\sourceforge\joceanus\moneywise\lethe\reports\MoneyWiseReportCapitalGains.java | MoneyWise Personal Finance - Core | 417 |
private void formatSubtraction(final MoneyWiseXAnalysisSecurityAttr pAttr,
final Object pValue,
final OceanusDecimal pFirst,
final OceanusDecimal pSecond) {
/* Ensure that we have an attribute table */
ensureAttrTable();
/* Format the attribute */
theBuilder.startRow(theAttrTable);
theBuilder.makeValueCell(theAttrTable, pAttr);
theBuilder.makeValueCell(theAttrTable, formatSubtraction(pFirst, pSecond));
theBuilder.makeValueCell(theAttrTable, pValue);
}
/**
* Format a subtraction.
* @param pFirst the first item
* @param pSecond the second item
* @return the formatted subtraction
*/
private String formatSubtraction(final OceanusDecimal pFirst,
final OceanusDecimal pSecond) {
return formatCombination(pFirst, pSecond, '-');
}
/**
* Format a combination.
* @param pFirst the first item
* @param pSecond the second item
* @param pSymbol the symbol
* @return the formatted combination
*/
private String formatCombination(final OceanusDecimal pFirst,
final OceanusDecimal pSecond,
final char pSymbol) {
theStringBuilder.setLength(0);
theStringBuilder.append(theFormatter.formatObject(pFirst));
theStringBuilder.append(pSymbol);
theStringBuilder.append(theFormatter.formatObject(pSecond));
return theStringBuilder.toString();
}
/**
* Format a Transfer.
* @param pEvent the event
* @param pValues the values for the transaction
*/
private void formatTransfer(final MoneyWiseXAnalysisEvent pEvent, | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseAssetBase.java | MoneyWise Personal Finance - Core | 442 |
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseCategoryBase.java | MoneyWise Personal Finance - Core | 271 |
return isClosed();
}
/**
* Set name value.
* @param pValue the value
* @throws OceanusException on error
*/
private void setValueName(final String pValue) throws OceanusException {
setEncryptedValue(PrometheusDataResource.DATAITEM_FIELD_NAME, pValue);
}
/**
* Set name value.
* @param pBytes the value
* @throws OceanusException on error
*/
private void setValueName(final byte[] pBytes) throws OceanusException {
setEncryptedValue(PrometheusDataResource.DATAITEM_FIELD_NAME, pBytes, String.class);
}
/**
* Set name value.
* @param pValue the value
*/
private void setValueName(final PrometheusEncryptedPair pValue) {
getValues().setUncheckedValue(PrometheusDataResource.DATAITEM_FIELD_NAME, pValue);
}
/**
* Set description value.
* @param pValue the value
* @throws OceanusException on error
*/
private void setValueDesc(final String pValue) throws OceanusException {
setEncryptedValue(PrometheusDataResource.DATAITEM_FIELD_DESC, pValue);
}
/**
* Set description value.
* @param pBytes the value
* @throws OceanusException on error
*/
private void setValueDesc(final byte[] pBytes) throws OceanusException {
setEncryptedValue(PrometheusDataResource.DATAITEM_FIELD_DESC, pBytes, String.class);
}
/**
* Set description value.
* @param pValue the value
*/
private void setValueDesc(final PrometheusEncryptedPair pValue) {
getValues().setUncheckedValue(PrometheusDataResource.DATAITEM_FIELD_DESC, pValue);
}
/**
* Set category value.
* @param pValue the value
*/
private void setValueCategory(final MoneyWiseAssetCategory pValue) { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\bc\BouncyDSTUKeyPair.java | GordianKnot Security Framework | 347 |
| net\sourceforge\joceanus\gordianknot\impl\bc\BouncySM2KeyPair.java | GordianKnot Security Framework | 130 |
theCoder = new BouncyDSTUCoder();
}
@Override
public void initForSigning(final GordianKeyPair pKeyPair) throws GordianException {
/* Initialise detail */
BouncyKeyPair.checkKeyPair(pKeyPair);
super.initForSigning(pKeyPair);
/* Initialise and set the signer */
final BouncyECPrivateKey myPrivate = (BouncyECPrivateKey) getKeyPair().getPrivateKey();
final ParametersWithRandom myParms = new ParametersWithRandom(myPrivate.getPrivateKey(), getRandom());
theSigner.init(true, myParms);
}
@Override
public void initForVerify(final GordianKeyPair pKeyPair) throws GordianException {
/* Initialise detail */
BouncyKeyPair.checkKeyPair(pKeyPair);
super.initForVerify(pKeyPair);
/* Initialise and set the signer */
final BouncyECPublicKey myPublic = (BouncyECPublicKey) getKeyPair().getPublicKey();
theSigner.init(false, myPublic.getPublicKey());
}
@Override
public byte[] sign() throws GordianException {
/* Check that we are in signing mode */
checkMode(GordianSignatureMode.SIGN); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianBlake2XEngine.java | GordianKnot Security Framework | 122 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianRabbitEngine.java | GordianKnot Security Framework | 156 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSkeinXofEngine.java | GordianKnot Security Framework | 123 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSnow3GEngine.java | GordianKnot Security Framework | 201 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSosemanukEngine.java | GordianKnot Security Framework | 109 |
}
@Override
public int processBytes(final byte[] in,
final int inOff,
final int len,
final byte[] out,
final int outOff) {
/* Check for errors */
if (theResetState == null) {
throw new IllegalStateException(getAlgorithmName() + " not initialised");
}
if ((inOff + len) > in.length) {
throw new DataLengthException("input buffer too short");
}
if ((outOff + len) > out.length) {
throw new OutputLengthException("output buffer too short");
}
/* Loop through the input bytes */
for (int i = 0; i < len; i++) {
out[i + outOff] = returnByte(in[i + inOff]);
}
return len;
}
@Override
public void reset() {
if (theResetState != null) { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianBlake3Engine.java | GordianKnot Security Framework | 116 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianRabbitEngine.java | GordianKnot Security Framework | 156 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSnow3GEngine.java | GordianKnot Security Framework | 201 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSosemanukEngine.java | GordianKnot Security Framework | 109 |
}
@Override
public int processBytes(final byte[] in,
final int inOff,
final int len,
final byte[] out,
final int outOff) {
/* Check for errors */
if (theResetState == null) {
throw new IllegalStateException(getAlgorithmName() + " not initialised");
}
if ((inOff + len) > in.length) {
throw new DataLengthException("input buffer too short");
}
if ((outOff + len) > out.length) {
throw new OutputLengthException("output buffer too short");
}
/* Loop through the input bytes */
for (int i = 0; i < len; i++) {
out[i + outOff] = returnByte(in[i + inOff]);
}
return len;
}
@Override
public void reset() {
if (theResetState != null) { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\dialog\MoneyWiseXTransactionDialog.java | MoneyWise Personal Finance - Core | 369 |
| net\sourceforge\joceanus\moneywise\lethe\ui\dialog\MoneyWiseTransactionDialog.java | MoneyWise Personal Finance - Core | 375 |
final MoneyWiseTransaction myTrans = getItem().getTransaction();
final boolean bIsReconciled = myTrans.isReconciled();
final boolean bIsLocked = myTrans.isLocked();
/* Determine whether the comments field should be visible */
boolean bShowField = isEditable || myTrans.getComments() != null;
theFieldSet.setFieldVisible(MoneyWiseTransInfoClass.COMMENTS, bShowField);
/* Determine whether the reference field should be visible */
bShowField = isEditable || myTrans.getReference() != null;
theFieldSet.setFieldVisible(MoneyWiseTransInfoClass.REFERENCE, bShowField);
/* Determine whether the tags field should be visible */
bShowField = isEditable || myTrans.getTransactionTags() != null;
theFieldSet.setFieldVisible(MoneyWiseTransInfoClass.TRANSTAG, bShowField);
/* Determine whether the partnerAmount field should be visible */
boolean bEditField = isEditable && isEditableField(myTrans, MoneyWiseTransInfoClass.PARTNERAMOUNT);
bShowField = bEditField || myTrans.getPartnerAmount() != null;
theFieldSet.setFieldVisible(MoneyWiseTransInfoClass.PARTNERAMOUNT, bShowField);
theFieldSet.setFieldEditable(MoneyWiseTransInfoClass.PARTNERAMOUNT, bEditField);
/* Determine whether the taxCredit field should be visible */
bEditField = isEditable && isEditableField(myTrans, MoneyWiseTransInfoClass.TAXCREDIT); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseAssetBase.java | MoneyWise Personal Finance - Core | 442 |
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseRegion.java | MoneyWise Personal Finance - Core | 195 |
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseTransTag.java | MoneyWise Personal Finance - Core | 195 |
return isClosed();
}
/**
* Set name value.
* @param pValue the value
* @throws OceanusException on error
*/
private void setValueName(final String pValue) throws OceanusException {
setEncryptedValue(PrometheusDataResource.DATAITEM_FIELD_NAME, pValue);
}
/**
* Set name value.
* @param pBytes the value
* @throws OceanusException on error
*/
private void setValueName(final byte[] pBytes) throws OceanusException {
setEncryptedValue(PrometheusDataResource.DATAITEM_FIELD_NAME, pBytes, String.class);
}
/**
* Set name value.
* @param pValue the value
*/
private void setValueName(final PrometheusEncryptedPair pValue) {
getValues().setUncheckedValue(PrometheusDataResource.DATAITEM_FIELD_NAME, pValue);
}
/**
* Set description value.
* @param pValue the value
* @throws OceanusException on error
*/
private void setValueDesc(final String pValue) throws OceanusException {
setEncryptedValue(PrometheusDataResource.DATAITEM_FIELD_DESC, pValue);
}
/**
* Set description value.
* @param pBytes the value
* @throws OceanusException on error
*/
private void setValueDesc(final byte[] pBytes) throws OceanusException {
setEncryptedValue(PrometheusDataResource.DATAITEM_FIELD_DESC, pBytes, String.class);
}
/**
* Set description value.
* @param pValue the value
*/
private void setValueDesc(final PrometheusEncryptedPair pValue) {
getValues().setUncheckedValue(PrometheusDataResource.DATAITEM_FIELD_DESC, pValue);
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\themis\analysis\ThemisAnalysisDoWhile.java | Themis Core Project Framework | 78 |
| net\sourceforge\joceanus\themis\analysis\ThemisAnalysisWhile.java | Themis Core Project Framework | 79 |
theContents = new ArrayDeque<>();
final ThemisAnalysisParser myParser = new ThemisAnalysisParser(myLines, theContents, this);
myParser.processLines();
}
@Override
public Deque<ThemisAnalysisElement> getContents() {
return theContents;
}
@Override
public Iterator<ThemisAnalysisStatement> statementIterator() {
return Collections.singleton(theCondition).iterator();
}
@Override
public ThemisAnalysisContainer getParent() {
return theParent;
}
@Override
public void setParent(final ThemisAnalysisContainer pParent) {
theParent = pParent;
theDataMap.setParent(pParent.getDataMap());
}
@Override
public ThemisAnalysisDataMap getDataMap() {
return theDataMap;
}
@Override
public int getNumLines() {
return theNumLines;
}
@Override
public String toString() {
return theCondition.toString();
}
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\bc\BouncyGOSTKeyPair.java | GordianKnot Security Framework | 388 |
| net\sourceforge\joceanus\gordianknot\impl\bc\BouncySM2KeyPair.java | GordianKnot Security Framework | 130 |
theCoder = new BouncyGOSTCoder(pSpec.getDigestSpec().getDigestLength().getByteLength() << 1);
}
@Override
public void initForSigning(final GordianKeyPair pKeyPair) throws GordianException {
/* Initialise detail */
BouncyKeyPair.checkKeyPair(pKeyPair);
super.initForSigning(pKeyPair);
/* Initialise and set the signer */
final BouncyECPrivateKey myPrivate = (BouncyECPrivateKey) getKeyPair().getPrivateKey();
final ParametersWithRandom myParms = new ParametersWithRandom(myPrivate.getPrivateKey(), getRandom());
theSigner.init(true, myParms);
}
@Override
public void initForVerify(final GordianKeyPair pKeyPair) throws GordianException {
/* Initialise detail */
BouncyKeyPair.checkKeyPair(pKeyPair);
super.initForVerify(pKeyPair);
/* Initialise and set the signer */
final BouncyECPublicKey myPublic = (BouncyECPublicKey) getKeyPair().getPublicKey();
theSigner.init(false, myPublic.getPublicKey());
}
@Override
public byte[] sign() throws GordianException {
/* Check that we are in signing mode */
checkMode(GordianSignatureMode.SIGN); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseCashInfoSet.java | MoneyWise Personal Finance - Core | 232 |
| net\sourceforge\joceanus\moneywise\data\validate\MoneyWiseValidateCashInfoSet.java | MoneyWise Personal Finance - Core | 58 |
: isClassRequired(myClass);
}
@Override
public MetisFieldRequired isClassRequired(final PrometheusDataInfoClass pClass) {
/* Access details about the Cash */
final MoneyWiseCash myCash = getOwner();
final MoneyWiseCashCategory myCategory = myCash.getCategory();
/* If we have no Category, no class is allowed */
if (myCategory == null) {
return MetisFieldRequired.NOTALLOWED;
}
/* Switch on class */
switch ((MoneyWiseAccountInfoClass) pClass) {
/* Allowed set */
case NOTES:
return MetisFieldRequired.CANEXIST;
case OPENINGBALANCE:
return myCash.isAutoExpense()
? MetisFieldRequired.NOTALLOWED
: MetisFieldRequired.CANEXIST;
case AUTOPAYEE:
case AUTOEXPENSE:
return myCash.isAutoExpense()
? MetisFieldRequired.MUSTEXIST
: MetisFieldRequired.NOTALLOWED;
/* Disallowed Set */
case SORTCODE:
case ACCOUNT:
case REFERENCE:
case WEBSITE:
case CUSTOMERNO:
case USERID:
case PASSWORD:
case MATURITY:
case SYMBOL:
case REGION:
case UNDERLYINGSTOCK:
case OPTIONPRICE:
default:
return MetisFieldRequired.NOTALLOWED;
}
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\ext\macs\GordianSkeinMac.java | GordianKnot Security Framework | 87 |
| net\sourceforge\joceanus\gordianknot\impl\ext\macs\GordianSkeinXMac.java | GordianKnot Security Framework | 94 |
return "Skein-MAC-" + (theEngine.getBlockSize() * Byte.SIZE) + "-" + (theEngine.getOutputSize() * Byte.SIZE);
}
/**
* Initialises the Skein digest with the provided parameters.<br>
* See {@link GordianSkeinParameters} for details on the parameterisation of the Skein hash function.
*
* @param params an instance of {@link GordianSkeinParameters} or {@link KeyParameter}.
*/
public void init(final CipherParameters params)
throws IllegalArgumentException {
final GordianSkeinParameters skeinParameters;
if (params instanceof GordianSkeinParameters) {
skeinParameters = (GordianSkeinParameters) params;
} else if (params instanceof KeyParameter) {
skeinParameters = new GordianSkeinParametersBuilder().setKey(((KeyParameter) params).getKey()).build();
} else {
throw new IllegalArgumentException("Invalid parameter passed to Skein MAC init - "
+ params.getClass().getName());
}
if (skeinParameters.getKey() == null) {
throw new IllegalArgumentException("Skein MAC requires a key parameter.");
}
theEngine.init(skeinParameters);
}
@Override
public int getMacSize() {
return theEngine.getOutputSize();
}
@Override
public void reset() { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\quicken\file\MoneyWiseQIFPortfolioBuilder.java | MoneyWise Personal Finance - Core | 696 |
| net\sourceforge\joceanus\moneywise\quicken\file\MoneyWiseQIFPortfolioBuilder.java | MoneyWise Personal Finance - Core | 813 |
final OceanusMoney myOutAmount = new OceanusMoney(myTaxCredit);
myOutAmount.negate();
/* If we are using a holding account */
if (useHoldingAccount) {
/* Access Holding Account */
final MoneyWiseQIFAccountEvents myHolding = theFile.registerHoldingAccount(myPortfolio);
/* Create an event */
final MoneyWiseQIFEvent myHoldEvent = new MoneyWiseQIFEvent(theFile, pTrans);
myHoldEvent.recordAmount(new OceanusMoney());
myHoldEvent.recordPayee(myTaxPayee);
/* record the splits */
myHoldEvent.recordSplitRecord(myQPortfolio.getAccount(), myTaxCredit, myPortfolio.getName());
myHoldEvent.recordSplitRecord(myTaxCategory, myOutAmount, myTaxPayee.getName());
/* Add to event list */
myHolding.addEvent(myHoldEvent);
/* else we can do this properly */
} else {
/* Create a tax credit event */
myEvent = new MoneyWiseQIFPortfolioEvent(theFile, pTrans, MoneyWiseQActionType.CASH);
myEvent.recordAmount(myOutAmount);
myEvent.recordPayee(myTaxPayee);
myEvent.recordCategory(myTaxCategory);
/* Add to event list */
myQPortfolio.addEvent(myEvent);
}
}
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseCategoryBase.java | MoneyWise Personal Finance - Core | 152 |
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseRegion.java | MoneyWise Personal Finance - Core | 146 |
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseTransTag.java | MoneyWise Personal Finance - Core | 146 |
return getParentCategory() != null;
}
/* Pass call on */
return super.includeXmlField(pField);
}
@Override
public String getName() {
return getValues().getValue(PrometheusDataResource.DATAITEM_FIELD_NAME, String.class);
}
/**
* Obtain Encrypted name.
* @return the bytes
*/
public byte[] getNameBytes() {
return getValues().getEncryptedBytes(PrometheusDataResource.DATAITEM_FIELD_NAME);
}
/**
* Obtain Encrypted Name Field.
* @return the Field
*/
private PrometheusEncryptedPair getNameField() {
return getValues().getEncryptedPair(PrometheusDataResource.DATAITEM_FIELD_NAME);
}
/**
* Obtain Description.
* @return the description
*/
public String getDesc() {
return getValues().getValue(PrometheusDataResource.DATAITEM_FIELD_DESC, String.class);
}
/**
* Obtain Encrypted description.
* @return the bytes
*/
public byte[] getDescBytes() {
return getValues().getEncryptedBytes(PrometheusDataResource.DATAITEM_FIELD_DESC);
}
/**
* Obtain Encrypted Description Field.
* @return the Field
*/
private PrometheusEncryptedPair getDescField() {
return getValues().getEncryptedPair(PrometheusDataResource.DATAITEM_FIELD_DESC);
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\quicken\file\MoneyWiseQIFLine.java | MoneyWise Personal Finance - Core | 962 |
| net\sourceforge\joceanus\moneywise\quicken\file\MoneyWiseQIFLine.java | MoneyWise Personal Finance - Core | 1242 |
myLine = pLine.substring(i + 1);
}
/* If the line contains classes */
if (myLine.contains(QIF_CLASS)) {
/* drop preceding data */
final int i = myLine.indexOf(QIF_CLASS);
myLine = myLine.substring(i + 1);
/* Build list of classes */
final String[] myClasses = myLine.split(QIF_CLASSSEP);
final List<MoneyWiseQIFClass> myList = new ArrayList<>();
for (String myClass : myClasses) {
myList.add(pFile.getClass(myClass));
}
/* Return the classes */
return myList;
}
/* Return no classes */
return null;
}
@Override
public boolean equals(final Object pThat) {
/* Handle trivial cases */
if (this == pThat) {
return true;
}
if (pThat == null) {
return false;
}
/* Check class */
if (!getClass().equals(pThat.getClass())) {
return false;
}
/* Cast correctly */
final MoneyWiseQIFXferAccountLine<?> myLine = (MoneyWiseQIFXferAccountLine<?>) pThat; | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\controls\MoneyWiseXCashAnalysisSelect.java | MoneyWise Personal Finance - Core | 266 |
| net\sourceforge\joceanus\moneywise\lethe\ui\controls\MoneyWiseCashAnalysisSelect.java | MoneyWise Personal Finance - Core | 266 |
protected MoneyWiseXAnalysisCashBucket getDefaultCash(final MoneyWiseCashCategory pCategory) {
return theCash.getDefaultCash(pCategory);
}
/**
* Handle new Category.
*/
private void handleNewCategory() {
/* Select the new category */
if (theState.setCategory(theCatButton.getValue())) {
theState.applyState();
theEventManager.fireEvent(PrometheusDataEvent.SELECTIONCHANGED);
}
}
/**
* Handle new Cash.
*/
private void handleNewCash() {
/* Select the new cash */
if (theState.setCash(theCashButton.getValue())) {
theState.applyState();
theEventManager.fireEvent(PrometheusDataEvent.SELECTIONCHANGED);
}
}
/**
* Build Category menu.
*/
private void buildCategoryMenu() {
/* Reset the popUp menu */
theCategoryMenu.removeAllItems();
/* Create a simple map for top-level categories */
final Map<String, TethysUIScrollSubMenu<MoneyWiseCashCategory>> myMap = new HashMap<>();
/* Record active item */
final MoneyWiseCashCategory myCurrent = theState.getCategory();
TethysUIScrollItem<MoneyWiseCashCategory> myActive = null;
/* Loop through the available category values */
final Iterator<MoneyWiseXAnalysisCashCategoryBucket> myIterator = theCategories.iterator(); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\controls\MoneyWiseXDepositAnalysisSelect.java | MoneyWise Personal Finance - Core | 261 |
| net\sourceforge\joceanus\moneywise\lethe\ui\controls\MoneyWiseDepositAnalysisSelect.java | MoneyWise Personal Finance - Core | 261 |
protected MoneyWiseXAnalysisDepositBucket getDefaultDeposit(final MoneyWiseDepositCategory pCategory) {
return theDeposits.getDefaultDeposit(pCategory);
}
/**
* Handle new Category.
*/
private void handleNewCategory() {
/* Select the new category */
if (theState.setCategory(theCatButton.getValue())) {
theState.applyState();
theEventManager.fireEvent(PrometheusDataEvent.SELECTIONCHANGED);
}
}
/**
* Handle new Deposit.
*/
private void handleNewDeposit() {
/* Select the new deposit */
if (theState.setDeposit(theDepositButton.getValue())) {
theState.applyState();
theEventManager.fireEvent(PrometheusDataEvent.SELECTIONCHANGED);
}
}
/**
* Build Category menu.
*/
private void buildCategoryMenu() {
/* Reset the popUp menu */
theCategoryMenu.removeAllItems();
/* Create a simple map for top-level categories */
final Map<String, TethysUIScrollSubMenu<MoneyWiseDepositCategory>> myMap = new HashMap<>();
/* Record active item */
final MoneyWiseDepositCategory myCurrent = theState.getCategory();
TethysUIScrollItem<MoneyWiseDepositCategory> myActive = null;
/* Re-Loop through the available category values */
final Iterator<MoneyWiseXAnalysisDepositCategoryBucket> myIterator = theCategories.iterator(); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\controls\MoneyWiseXLoanAnalysisSelect.java | MoneyWise Personal Finance - Core | 261 |
| net\sourceforge\joceanus\moneywise\lethe\ui\controls\MoneyWiseLoanAnalysisSelect.java | MoneyWise Personal Finance - Core | 261 |
protected MoneyWiseXAnalysisLoanBucket getDefaultLoan(final MoneyWiseLoanCategory pCategory) {
return theLoans.getDefaultLoan(pCategory);
}
/**
* Handle new Category.
*/
private void handleNewCategory() {
/* Select the new category */
if (theState.setCategory(theCatButton.getValue())) {
theState.applyState();
theEventManager.fireEvent(PrometheusDataEvent.SELECTIONCHANGED);
}
}
/**
* Handle new Loan.
*/
private void handleNewLoan() {
/* Select the new loan */
if (theState.setLoan(theLoanButton.getValue())) {
theState.applyState();
theEventManager.fireEvent(PrometheusDataEvent.SELECTIONCHANGED);
}
}
/**
* Build Category menu.
*/
private void buildCategoryMenu() {
/* Reset the popUp menu */
theCategoryMenu.removeAllItems();
/* Create a simple map for top-level categories */
final Map<String, TethysUIScrollSubMenu<MoneyWiseLoanCategory>> myMap = new HashMap<>();
/* Record active item */
final MoneyWiseLoanCategory myCurrent = theState.getCategory();
TethysUIScrollItem<MoneyWiseLoanCategory> myActive = null;
/* Re-Loop through the available category values */
final Iterator<MoneyWiseXAnalysisLoanCategoryBucket> myIterator = theCategories.iterator(); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\dialog\MoneyWiseXTransactionDialog.java | MoneyWise Personal Finance - Core | 431 |
| net\sourceforge\joceanus\moneywise\lethe\ui\dialog\MoneyWiseTransactionDialog.java | MoneyWise Personal Finance - Core | 455 |
theFieldSet.setFieldEditable(MoneyWiseTransInfoClass.PARTNERDELTAUNITS, bEditField);
/* Determine whether the dilution field should be visible */
bEditField = isEditable && isEditableField(myTrans, MoneyWiseTransInfoClass.DILUTION);
bShowField = bEditField || myTrans.getDilution() != null;
theFieldSet.setFieldVisible(MoneyWiseTransInfoClass.DILUTION, bShowField);
theFieldSet.setFieldEditable(MoneyWiseTransInfoClass.DILUTION, bEditField);
/* Determine whether the returnedAccount field should be visible */
bEditField = isEditable && isEditableField(myTrans, MoneyWiseTransInfoClass.RETURNEDCASHACCOUNT);
bShowField = bEditField || myTrans.getReturnedCashAccount() != null;
theFieldSet.setFieldVisible(MoneyWiseTransInfoClass.RETURNEDCASHACCOUNT, bShowField);
theFieldSet.setFieldEditable(MoneyWiseTransInfoClass.RETURNEDCASHACCOUNT, bEditField);
/* Determine whether the returnedCash field should be visible */
bEditField = isEditable && isEditableField(myTrans, MoneyWiseTransInfoClass.RETURNEDCASH);
bShowField = bEditField || myTrans.getReturnedCash() != null;
theFieldSet.setFieldVisible(MoneyWiseTransInfoClass.RETURNEDCASH, bShowField);
theFieldSet.setFieldEditable(MoneyWiseTransInfoClass.RETURNEDCASH, bEditField); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseDepositInfoSet.java | MoneyWise Personal Finance - Core | 177 |
| net\sourceforge\joceanus\moneywise\data\validate\MoneyWiseValidateDepositInfoSet.java | MoneyWise Personal Finance - Core | 46 |
: isClassRequired(myClass);
}
@Override
public MetisFieldRequired isClassRequired(final PrometheusDataInfoClass pClass) {
/* Access details about the Deposit */
final MoneyWiseDeposit myDeposit = getOwner();
final MoneyWiseDepositCategory myCategory = myDeposit.getCategory();
/* If we have no Category, no class is allowed */
if (myCategory == null) {
return MetisFieldRequired.NOTALLOWED;
}
final MoneyWiseDepositCategoryClass myClass = myCategory.getCategoryTypeClass();
/* Switch on class */
switch ((MoneyWiseAccountInfoClass) pClass) {
/* Allowed set */
case NOTES:
case SORTCODE:
case ACCOUNT:
case REFERENCE:
case OPENINGBALANCE:
return MetisFieldRequired.CANEXIST;
/* Handle Maturity */
case MATURITY:
return myClass.hasMaturity()
? MetisFieldRequired.MUSTEXIST
: MetisFieldRequired.NOTALLOWED;
/* Not allowed */
case AUTOEXPENSE:
case AUTOPAYEE:
case WEBSITE:
case CUSTOMERNO:
case USERID:
case PASSWORD:
case SYMBOL:
case REGION:
case UNDERLYINGSTOCK:
case OPTIONPRICE:
default:
return MetisFieldRequired.NOTALLOWED;
}
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseTransInfoSet.java | MoneyWise Personal Finance - Core | 663 |
| net\sourceforge\joceanus\moneywise\data\validate\MoneyWiseValidateTransInfoSet.java | MoneyWise Personal Finance - Core | 624 |
}
}
/**
* Determine if AccountDeltaUnits can/mustBe/mustNotBe positive.
* @param pDir the direction
* @param pClass the category class
* @return the status
*/
public static MetisFieldRequired isAccountUnitsPositive(final MoneyWiseAssetDirection pDir,
final MoneyWiseTransCategoryClass pClass) {
switch (pClass) {
case TRANSFER:
return pDir.isFrom()
? MetisFieldRequired.MUSTEXIST
: MetisFieldRequired.NOTALLOWED;
case UNITSADJUST:
case STOCKSPLIT:
return MetisFieldRequired.CANEXIST;
case INHERITED:
case DIVIDEND:
case STOCKRIGHTSISSUE:
return MetisFieldRequired.MUSTEXIST;
case STOCKDEMERGER:
default:
return MetisFieldRequired.NOTALLOWED;
}
}
/**
* Determine if PartnerDeltaUnits can/mustBe/mustNotBe positive.
* @param pDir the direction
* @param pClass the category class
* @return the status
*/
public static MetisFieldRequired isPartnerUnitsPositive(final MoneyWiseAssetDirection pDir,
final MoneyWiseTransCategoryClass pClass) {
switch (pClass) {
case TRANSFER:
return pDir.isTo()
? MetisFieldRequired.MUSTEXIST
: MetisFieldRequired.NOTALLOWED;
case STOCKDEMERGER:
case SECURITYREPLACE:
case STOCKTAKEOVER:
case STOCKRIGHTSISSUE:
return MetisFieldRequired.MUSTEXIST;
default:
return MetisFieldRequired.NOTALLOWED;
}
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\ext\digests\GordianBlake2Tree.java | GordianKnot Security Framework | 238 |
| net\sourceforge\joceanus\gordianknot\impl\ext\digests\GordianSkeinTree.java | GordianKnot Security Framework | 285 |
theStore.init(pParams);
}
/**
* Update leaf.
* @param pIndex the index of the leaf
* @param pInput the input buffer
* @param pInOffSet the starting offset the the input buffer
*/
public void updateLeaf(final int pIndex,
final byte[] pInput,
final int pInOffSet) {
/* Full leafLen */
updateLeaf(pIndex, pInput, pInOffSet, getLeafLen());
}
/**
* Update leaf.
* @param pIndex the index of the leaf
* @param pInput the input buffer
* @param pInOffSet the starting offset the the input buffer
* @param pLen the length of data
*/
public void updateLeaf(final int pIndex,
final byte[] pInput,
final int pInOffSet,
final int pLen) {
/* Check index validity */
final boolean bLast = theStore.checkLeafIndex(pIndex);
/* Validate the leaf length */
final int myLeafLen = getLeafLen();
if (pLen < 0 || pLen > myLeafLen) {
throw new DataLengthException("Invalid length");
}
/* Any leaf that is not the last must be leafLen in length */
if (!bLast && pLen != myLeafLen) {
throw new DataLengthException("All but the last leaf must have byteLength " + myLeafLen);
}
/* Make sure that the buffer is valid */
if (pLen + pInOffSet > pInput.length) {
throw new DataLengthException("Invalid input buffer");
}
/* Initialise the node and note if last node */
theDigest.setNodePosition(pIndex, 0); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\coeus\data\fundingcircle\CoeusFundingCircleLoader.java | Coeus Core Peer2Peer Analysis | 103 |
| net\sourceforge\joceanus\coeus\data\zopa\CoeusZopaLoader.java | Coeus Core Peer2Peer Analysis | 93 |
theBasePath = mySystem.getPath(myPath);
}
/**
* Obtain sorted list of statements.
* @return the list of statements
* @throws OceanusException on error
*/
private List<StatementRecord> listStatements() throws OceanusException {
/* Create list and formatter */
final List<StatementRecord> myList = new ArrayList<>();
final DateTimeFormatter myFormatter = DateTimeFormatter.ofPattern(DATEPATTERN);
/* Loop through statement file in the directory */
try (DirectoryStream<Path> myStream = Files.newDirectoryStream(theBasePath, MASK)) {
for (final Path myFile : myStream) {
/* Skip null entries */
final Path myFileName = myFile.getFileName();
if (myFileName == null) {
continue;
}
/* Parse the file name */
final String myName = myFileName.toString();
String myBase = myName.substring(0, myName.length() - SUFFIX.length());
myBase = myBase.substring(PREFIX.length()); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\ui\panel\MoneyWiseAccountPanel.java | MoneyWise Personal Finance - Core | 595 |
| net\sourceforge\joceanus\moneywise\ui\panel\MoneyWiseCategoryPanel.java | MoneyWise Personal Finance - Core | 589 |
theEventManager.fireEvent(PrometheusDataEvent.ADJUSTVISIBILITY);
}
/**
* handleErrorPane.
*/
private void handleErrorPane() {
/* Determine whether we have an error */
final boolean isError = theError.hasError();
/* Hide selection panel on error */
theSelectPanel.setVisible(!isError);
/* Lock card panel */
theCardPanel.setEnabled(!isError);
/* Lock Action Buttons */
theActionButtons.setEnabled(!isError);
}
/**
* handleSelection.
*/
private void handleSelection() {
/* Cancel any editing */
cancelEditing();
/* Show selected panel */
showPanel(theSelectButton.getValue());
}
/**
* handle Action Buttons.
* @param pEvent the event
*/
private void handleActionButtons(final OceanusEvent<PrometheusUIEvent> pEvent) {
/* Cancel editing */
cancelEditing();
/* Perform the command */
theEditSet.processCommand(pEvent.getEventId(), theError);
}
/**
* handle GoTo Event.
* @param pEvent the event
*/
private void handleGoToEvent(final OceanusEvent<PrometheusDataEvent> pEvent) {
/* Access details */
@SuppressWarnings("unchecked")
final PrometheusGoToEvent<MoneyWiseGoToId> myEvent = pEvent.getDetails(PrometheusGoToEvent.class);
/* Access event and obtain details */
switch (myEvent.getId()) {
/* Pass through the event */
case STATEMENT:
case CATEGORY: | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\ui\panel\MoneyWiseRegionTable.java | MoneyWise Personal Finance - Core | 110 |
| net\sourceforge\joceanus\moneywise\ui\panel\MoneyWiseTransTagTable.java | MoneyWise Personal Finance - Core | 110 |
.setOnCommit((r, v) -> updateField(MoneyWiseRegion::setDescription, r, v));
/* Create the Active column */
final TethysUIIconMapSet<MetisAction> myActionMapSet = MetisIcon.configureStatusIconButton(pView.getGuiFactory());
myTable.declareIconColumn(PrometheusDataResource.DATAITEM_TOUCH, MetisAction.class)
.setIconMapSet(r -> myActionMapSet)
.setCellValueFactory(r -> r.isActive() ? MetisAction.ACTIVE : MetisAction.DELETE)
.setName(MoneyWiseUIResource.STATICDATA_ACTIVE.getValue())
.setEditable(true)
.setCellEditable(r -> !r.isActive())
.setColumnWidth(WIDTH_ICON)
.setOnCommit((r, v) -> updateField(this::deleteRow, r, v));
/* Add listeners */
myNewButton.getEventRegistrar().addEventListener(e -> addNewItem()); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\jca\JcaSignature.java | GordianKnot Security Framework | 399 |
| net\sourceforge\joceanus\gordianknot\impl\jca\JcaSignature.java | GordianKnot Security Framework | 455 |
JcaSLHDSASignature(final GordianCoreFactory pFactory,
final GordianSignatureSpec pSignatureSpec) throws GordianException {
/* Initialise class */
super(pFactory, pSignatureSpec);
}
@Override
public void initForSigning(final GordianKeyPair pKeyPair) throws GordianException {
/* Determine the required signer */
JcaKeyPair.checkKeyPair(pKeyPair);
final String mySignName = getAlgorithmForKeyPair(pKeyPair);
setSigner(JcaSignatureFactory.getJavaSignature(mySignName, false));
/* pass on call */
super.initForSigning(pKeyPair);
}
@Override
public void initForVerify(final GordianKeyPair pKeyPair) throws GordianException {
/* Determine the required signer */
JcaKeyPair.checkKeyPair(pKeyPair);
final String mySignName = getAlgorithmForKeyPair(pKeyPair);
setSigner(JcaSignatureFactory.getJavaSignature(mySignName, false));
/* pass on call */
super.initForVerify(pKeyPair);
}
/**
* Obtain algorithmName for keyPair.
* @param pKeyPair the keyPair
* @return the name
*/
private static String getAlgorithmForKeyPair(final GordianKeyPair pKeyPair) {
/* Build the algorithm */
final boolean isHash = pKeyPair.getKeyPairSpec().getSLHDSAKeySpec().isHash(); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSosemanukEngine.java | GordianKnot Security Framework | 567 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSosemanukEngine.java | GordianKnot Security Framework | 843 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSosemanukEngine.java | GordianKnot Security Framework | 1119 |
tt = w7 ^ w2 ^ w4 ^ w6 ^ (0x9E3779B9 ^ (28 + 3));
w7 = rotateLeft(tt, 11);
r0 = w4;
r1 = w5;
r2 = w6;
r3 = w7;
r1 ^= r3;
r3 = ~r3;
r2 ^= r3;
r3 ^= r0;
r4 = r1;
r1 &= r3;
r1 ^= r2;
r4 ^= r3;
r0 ^= r4;
r2 &= r4;
r2 ^= r0;
r0 &= r1;
r3 ^= r0;
r4 |= r1;
r4 ^= r0;
r0 |= r3;
r0 ^= r2;
r2 &= r3;
r0 = ~r0;
r4 ^= r2;
serpent24SubKeys[i++] = r1;
serpent24SubKeys[i++] = r4;
serpent24SubKeys[i++] = r0;
serpent24SubKeys[i++] = r3;
tt = w0 ^ w3 ^ w5 ^ w7 ^ (0x9E3779B9 ^ (32)); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\themis\analysis\ThemisAnalysisBlock.java | Themis Core Project Framework | 74 |
| net\sourceforge\joceanus\themis\analysis\ThemisAnalysisLambda.java | Themis Core Project Framework | 59 |
theParent = pParser.getParent();
theDataMap = new ThemisAnalysisDataMap(theParent.getDataMap());
/* Create the arrays */
final Deque<ThemisAnalysisElement> myLines = ThemisAnalysisBuilder.processBody(pParser);
/* Create a parser */
theContents = new ArrayDeque<>();
final ThemisAnalysisParser myParser = new ThemisAnalysisParser(myLines, theContents, this);
myParser.processLines();
}
@Override
public Deque<ThemisAnalysisElement> getContents() {
return theContents;
}
@Override
public ThemisAnalysisContainer getParent() {
return theParent;
}
@Override
public void setParent(final ThemisAnalysisContainer pParent) {
theParent = pParent;
theDataMap.setParent(pParent.getDataMap());
}
@Override
public ThemisAnalysisDataMap getDataMap() {
return theDataMap;
}
@Override
public int getNumLines() {
return theNumLines; | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSosemanukEngine.java | GordianKnot Security Framework | 462 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSosemanukEngine.java | GordianKnot Security Framework | 738 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSosemanukEngine.java | GordianKnot Security Framework | 1014 |
tt = w3 ^ w6 ^ w0 ^ w2 ^ (0x9E3779B9 ^ (16 + 3));
w3 = rotateLeft(tt, 11);
r0 = w0;
r1 = w1;
r2 = w2;
r3 = w3;
r4 = r1;
r1 |= r2;
r1 ^= r3;
r4 ^= r2;
r2 ^= r1;
r3 |= r4;
r3 &= r0;
r4 ^= r2;
r3 ^= r1;
r1 |= r4;
r1 ^= r0;
r0 |= r4;
r0 ^= r2;
r1 ^= r4;
r2 ^= r1;
r1 &= r0;
r1 ^= r4;
r2 = ~r2;
r2 |= r0;
r4 ^= r2;
serpent24SubKeys[i++] = r4;
serpent24SubKeys[i++] = r3;
serpent24SubKeys[i++] = r1;
serpent24SubKeys[i++] = r0;
tt = w4 ^ w7 ^ w1 ^ w3 ^ (0x9E3779B9 ^ (20)); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\reports\MoneyWiseXReportBalanceSheet.java | MoneyWise Personal Finance - Core | 116 |
| net\sourceforge\joceanus\moneywise\lethe\reports\MoneyWiseReportBalanceSheet.java | MoneyWise Personal Finance - Core | 116 |
final MoneyWiseXAnalysisPortfolioBucketList myPortfolios = theAnalysis.getPortfolios();
final OceanusDateRange myDateRange = theAnalysis.getDateRange();
/* Create the totals */
final OceanusMoney myTotal = new OceanusMoney();
final OceanusMoney myBase = new OceanusMoney();
final OceanusMoney myDelta = new OceanusMoney();
/* Start the report */
final Element myBody = theBuilder.startReport();
theBuilder.makeTitle(myBody, TEXT_TITLE, theFormatter.formatObject(myDateRange));
/* Initialise the table */
final MetisHTMLTable myTable = theBuilder.startTable(myBody);
theBuilder.startTotalRow(myTable);
theBuilder.makeTitleCell(myTable);
theBuilder.makeTitleCell(myTable, theFormatter.formatObject(myDateRange.getEnd()));
theBuilder.makeTitleCell(myTable, theFormatter.formatObject(myDateRange.getStart()));
theBuilder.makeTitleCell(myTable, MoneyWiseXReportBuilder.TEXT_PROFIT); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\quicken\file\MoneyWiseQIFBuilder.java | MoneyWise Personal Finance - Core | 957 |
| net\sourceforge\joceanus\moneywise\quicken\file\MoneyWiseQIFBuilder.java | MoneyWise Personal Finance - Core | 995 |
protected void processCashRecovery(final MoneyWisePayee pPayee,
final MoneyWiseCash pCash,
final MoneyWiseTransaction pTrans) {
/* Access the Payee details */
final MoneyWiseQIFPayee myPayee = theFile.registerPayee(pPayee);
/* Access the Category details */
final MoneyWiseQIFEventCategory myCategory = theFile.registerCategory(pTrans.getCategory());
final MoneyWiseQIFEventCategory myAutoCategory = theFile.registerCategory(pCash.getAutoExpense());
/* Access the Account details */
final MoneyWiseQIFAccountEvents myAccount = theFile.registerAccount(pCash);
/* Obtain classes */
final List<MoneyWiseQIFClass> myList = getTransactionClasses(pTrans);
/* Access the amount */
final OceanusMoney myInAmount = pTrans.getAmount();
final OceanusMoney myOutAmount = new OceanusMoney(myInAmount);
myOutAmount.negate();
/* Create a new event */
final MoneyWiseQIFEvent myEvent = new MoneyWiseQIFEvent(theFile, pTrans);
myEvent.recordAmount(new OceanusMoney());
myEvent.recordPayee(myPayee);
myEvent.recordSplitRecord(myCategory, myList, myInAmount, myPayee.getName()); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\tethys\javafx\pane\TethysUIFXBoxPaneManager.java | Tethys JavaFX Utilities | 91 |
| net\sourceforge\joceanus\tethys\javafx\pane\TethysUIFXFlowPaneManager.java | Tethys JavaFX Utilities | 69 |
theBoxPane.getChildren().add(TethysUIFXNode.getNode(pNode));
}
@Override
public void setChildVisible(final TethysUIComponent pChild,
final boolean pVisible) {
/* Handle nothing to do */
final Node myChildNode = TethysUIFXNode.getNode(pChild);
final boolean isVisible = myChildNode.isVisible();
if (isVisible == pVisible) {
return;
}
/* If the node is not visible */
if (pVisible) {
/* Count visible prior siblings */
final int myId = pChild.getId();
int myIndex = 0;
final Iterator<TethysUIComponent> myIterator = iterator();
while (myIterator.hasNext()) {
final TethysUIComponent myNode = myIterator.next();
final Integer myNodeId = myNode.getId();
/* If we have found the node */
if (myNodeId == myId) {
/* Set visible and add into the list */
myChildNode.setVisible(true); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\ext\digests\GordianBlake2Tree.java | GordianKnot Security Framework | 357 |
| net\sourceforge\joceanus\gordianknot\impl\ext\digests\GordianSkeinTree.java | GordianKnot Security Framework | 431 |
theHashes.clear();
treeBuilt = false;
}
/**
* Add intermediate node.
* @param pHash the intermediate hash
*/
void addElement(final byte[] pHash) {
/* Access the base level */
if (theHashes.isEmpty()) {
theHashes.addElement(new SimpleVector());
}
final SimpleVector myLevel = (SimpleVector) theHashes.firstElement();
/* Add the element to the vector */
myLevel.addElement(Arrays.clone(pHash));
}
/**
* Obtain the tree result.
* @param pOut the output buffer
* @param pOutOffset the offset into the output buffer
* @return the number of bytes returned
*/
int obtainResult(final byte[] pOut,
final int pOutOffset) {
/* Check parameters */
if (pOut.length < pOutOffset + theResult.length) {
throw new OutputLengthException("Insufficient output buffer");
}
if (!treeBuilt) {
throw new IllegalStateException("tree has not been built");
}
/* Access the final level */
final SimpleVector myLevel = (SimpleVector) theHashes.lastElement();
final byte[] myResult = (byte[]) myLevel.firstElement(); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSosemanukEngine.java | GordianKnot Security Framework | 532 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSosemanukEngine.java | GordianKnot Security Framework | 808 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSosemanukEngine.java | GordianKnot Security Framework | 1084 |
tt = w3 ^ w6 ^ w0 ^ w2 ^ (0x9E3779B9 ^ (24 + 3));
w3 = rotateLeft(tt, 11);
r0 = w0;
r1 = w1;
r2 = w2;
r3 = w3;
r0 ^= r1;
r1 ^= r3;
r3 = ~r3;
r4 = r1;
r1 &= r0;
r2 ^= r3;
r1 ^= r2;
r2 |= r4;
r4 ^= r3;
r3 &= r1;
r3 ^= r0;
r4 ^= r1;
r4 ^= r2;
r2 ^= r0;
r0 &= r3;
r2 = ~r2;
r0 ^= r4;
r4 |= r3;
r2 ^= r4;
serpent24SubKeys[i++] = r1;
serpent24SubKeys[i++] = r3;
serpent24SubKeys[i++] = r0;
serpent24SubKeys[i++] = r2;
tt = w4 ^ w7 ^ w1 ^ w3 ^ (0x9E3779B9 ^ (28)); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\controls\MoneyWiseXAnalysisSelect.java | MoneyWise Personal Finance - Core | 366 |
| net\sourceforge\joceanus\moneywise\lethe\ui\controls\MoneyWiseAnalysisSelect.java | MoneyWise Personal Finance - Core | 366 |
final MoneyWiseXStatementSelect mySelect = new MoneyWiseXStatementSelect(theRangeSelect, new MoneyWiseXAnalysisAllFilter());
selectStatement(mySelect);
/* Access the menus */
theTypeMenu = theFilterTypeButton.getMenu();
theBucketMenu = theBucketButton.getMenu();
theColumnMenu = theColumnButton.getMenu();
/* Create the listeners */
OceanusEventRegistrar<TethysUIEvent> myRegistrar = theFilterTypeButton.getEventRegistrar();
myRegistrar.addEventListener(TethysUIEvent.NEWVALUE, e -> handleFilterType());
theFilterTypeButton.setMenuConfigurator(e -> buildAnalysisTypeMenu());
myRegistrar = theBucketButton.getEventRegistrar();
myRegistrar.addEventListener(TethysUIEvent.NEWVALUE, e -> handleNewBucket());
theBucketButton.setMenuConfigurator(e -> buildBucketMenu());
myRegistrar = theColumnButton.getEventRegistrar();
myRegistrar.addEventListener(TethysUIEvent.NEWVALUE, e -> handleNewColumns());
theColumnButton.setMenuConfigurator(e -> buildColumnsMenu()); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\ui\dialog\MoneyWiseDepositDialog.java | MoneyWise Personal Finance - Core | 148 |
| net\sourceforge\joceanus\moneywise\ui\dialog\MoneyWiseLoanDialog.java | MoneyWise Personal Finance - Core | 122 |
theFieldSet.addField(MoneyWiseBasicResource.ASSET_CLOSED, myClosedButton, MoneyWiseDeposit::isClosed);
/* Configure the menuBuilders */
myCategoryButton.setMenuConfigurator(c -> buildCategoryMenu(c, getItem()));
myParentButton.setMenuConfigurator(c -> buildParentMenu(c, getItem()));
myCurrencyButton.setMenuConfigurator(c -> buildCurrencyMenu(c, getItem()));
final Map<Boolean, TethysUIIconMapSet<Boolean>> myMapSets = MoneyWiseIcon.configureLockedIconButton(pFactory);
myClosedButton.setIconMapSet(() -> myMapSets.get(theClosedState));
/* Configure validation checks */
myName.setValidator(this::isValidName);
myDesc.setValidator(this::isValidDesc);
}
/**
* Build account subPanel.
* @param pFactory the GUI factory
*/
private void buildAccountPanel(final TethysUIFactory<?> pFactory) {
/* Create a new panel */
theFieldSet.newPanel(TAB_ACCOUNT);
/* Allocate fields */
final TethysUIFieldFactory myFields = pFactory.fieldFactory();
final TethysUIDateButtonField myMaturity = myFields.newDateField(); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\ui\dialog\MoneyWiseDepositRateTable.java | MoneyWise Personal Finance - Core | 108 |
| net\sourceforge\joceanus\moneywise\ui\dialog\MoneyWiseSecurityPriceTable.java | MoneyWise Personal Finance - Core | 103 |
.setOnCommit((r, v) -> updateField(MoneyWiseDepositRate::setEndDate, r, v));
/* Create the Active column */
final TethysUIIconMapSet<MetisAction> myActionMapSet = MetisIcon.configureStatusIconButton(pView.getGuiFactory());
theActiveColumn = myTable.declareIconColumn(PrometheusDataResource.DATAITEM_TOUCH, MetisAction.class)
.setIconMapSet(r -> myActionMapSet)
.setCellValueFactory(r -> r.isActive() ? MetisAction.ACTIVE : MetisAction.DELETE)
.setName(MoneyWiseUIResource.STATICDATA_ACTIVE.getValue())
.setEditable(true)
.setCellEditable(r -> !r.isActive())
.setColumnWidth(WIDTH_ICON)
.setOnCommit((r, v) -> updateField(this::deleteRow, r, v));
}
@Override
public void refreshData() { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\bc\BouncyDSAKeyPair.java | GordianKnot Security Framework | 332 |
| net\sourceforge\joceanus\gordianknot\impl\bc\BouncyGOSTKeyPair.java | GordianKnot Security Framework | 410 |
final BouncyDSAPublicKey myPublic = (BouncyDSAPublicKey) getKeyPair().getPublicKey();
theSigner.init(false, myPublic.getPublicKey());
}
@Override
public byte[] sign() throws GordianException {
/* Check that we are in signing mode */
checkMode(GordianSignatureMode.SIGN);
/* Sign the message */
final BigInteger[] myValues = theSigner.generateSignature(getDigest());
return theCoder.dsaEncode(myValues[0], myValues[1]);
}
@Override
public boolean verify(final byte[] pSignature) throws GordianException {
/* Check that we are in verify mode */
checkMode(GordianSignatureMode.VERIFY);
/* Verify the message */
final BigInteger[] myValues = theCoder.dsaDecode(pSignature);
return theSigner.verifySignature(getDigest(), myValues[0], myValues[1]);
}
}
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\bc\BouncyDSAKeyPair.java | GordianKnot Security Framework | 332 |
| net\sourceforge\joceanus\gordianknot\impl\bc\BouncyEllipticKeyPair.java | GordianKnot Security Framework | 377 |
final BouncyDSAPublicKey myPublic = (BouncyDSAPublicKey) getKeyPair().getPublicKey();
theSigner.init(false, myPublic.getPublicKey());
}
@Override
public byte[] sign() throws GordianException {
/* Check that we are in signing mode */
checkMode(GordianSignatureMode.SIGN);
/* Sign the message */
final BigInteger[] myValues = theSigner.generateSignature(getDigest());
return theCoder.dsaEncode(myValues[0], myValues[1]);
}
@Override
public boolean verify(final byte[] pSignature) throws GordianException {
/* Check that we are in verify mode */
checkMode(GordianSignatureMode.VERIFY);
/* Verify the message */
final BigInteger[] myValues = theCoder.dsaDecode(pSignature);
return theSigner.verifySignature(getDigest(), myValues[0], myValues[1]);
}
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSosemanukEngine.java | GordianKnot Security Framework | 603 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSosemanukEngine.java | GordianKnot Security Framework | 879 |
tt = w3 ^ w6 ^ w0 ^ w2 ^ (0x9E3779B9 ^ (32 + 3));
w3 = rotateLeft(tt, 11);
r0 = w0;
r1 = w1;
r2 = w2;
r3 = w3;
r4 = r0;
r0 |= r3;
r3 ^= r1;
r1 &= r4;
r4 ^= r2;
r2 ^= r3;
r3 &= r0;
r4 |= r1;
r3 ^= r4;
r0 ^= r1;
r4 &= r0;
r1 ^= r3;
r4 ^= r2;
r1 |= r0;
r1 ^= r2;
r0 ^= r3;
r2 = r1;
r1 |= r3;
r1 ^= r0;
serpent24SubKeys[i++] = r1;
serpent24SubKeys[i++] = r2;
serpent24SubKeys[i++] = r3;
serpent24SubKeys[i++] = r4;
tt = w4 ^ w7 ^ w1 ^ w3 ^ (0x9E3779B9 ^ (36)); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseAssetBase.java | MoneyWise Personal Finance - Core | 388 |
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseCategoryBase.java | MoneyWise Personal Finance - Core | 157 |
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseRegion.java | MoneyWise Personal Finance - Core | 151 |
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseTransTag.java | MoneyWise Personal Finance - Core | 151 |
}
@Override
public String getName() {
return getValues().getValue(PrometheusDataResource.DATAITEM_FIELD_NAME, String.class);
}
/**
* Obtain Encrypted name.
* @return the bytes
*/
public byte[] getNameBytes() {
return getValues().getEncryptedBytes(PrometheusDataResource.DATAITEM_FIELD_NAME);
}
/**
* Obtain Encrypted Name Field.
* @return the Field
*/
private PrometheusEncryptedPair getNameField() {
return getValues().getEncryptedPair(PrometheusDataResource.DATAITEM_FIELD_NAME);
}
/**
* Obtain Description.
* @return the description
*/
public String getDesc() {
return getValues().getValue(PrometheusDataResource.DATAITEM_FIELD_DESC, String.class);
}
/**
* Obtain Encrypted description.
* @return the bytes
*/
public byte[] getDescBytes() {
return getValues().getEncryptedBytes(PrometheusDataResource.DATAITEM_FIELD_DESC);
}
/**
* Obtain Encrypted Description Field.
* @return the Field
*/
private PrometheusEncryptedPair getDescField() {
return getValues().getEncryptedPair(PrometheusDataResource.DATAITEM_FIELD_DESC);
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\bc\BouncyDSAKeyPair.java | GordianKnot Security Framework | 332 |
| net\sourceforge\joceanus\gordianknot\impl\bc\BouncyDSTUKeyPair.java | GordianKnot Security Framework | 369 |
final BouncyDSAPublicKey myPublic = (BouncyDSAPublicKey) getKeyPair().getPublicKey();
theSigner.init(false, myPublic.getPublicKey());
}
@Override
public byte[] sign() throws GordianException {
/* Check that we are in signing mode */
checkMode(GordianSignatureMode.SIGN);
/* Sign the message */
final BigInteger[] myValues = theSigner.generateSignature(getDigest());
return theCoder.dsaEncode(myValues[0], myValues[1]);
}
@Override
public boolean verify(final byte[] pSignature) throws GordianException {
/* Check that we are in verify mode */
checkMode(GordianSignatureMode.VERIFY);
/* Verify the message */
final BigInteger[] myValues = theCoder.dsaDecode(pSignature);
return theSigner.verifySignature(getDigest(), myValues[0], myValues[1]);
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSosemanukEngine.java | GordianKnot Security Framework | 394 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSosemanukEngine.java | GordianKnot Security Framework | 670 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSosemanukEngine.java | GordianKnot Security Framework | 946 |
tt = w3 ^ w6 ^ w0 ^ w2 ^ (0x9E3779B9 ^ (8 + 3));
w3 = rotateLeft(tt, 11);
r0 = w0;
r1 = w1;
r2 = w2;
r3 = w3;
r0 = ~r0;
r2 = ~r2;
r4 = r0;
r0 &= r1;
r2 ^= r0;
r0 |= r3;
r3 ^= r2;
r1 ^= r0;
r0 ^= r4;
r4 |= r1;
r1 ^= r3;
r2 |= r0;
r2 &= r4;
r0 ^= r1;
r1 &= r2;
r1 ^= r0;
r0 &= r2;
r0 ^= r4;
serpent24SubKeys[i++] = r2;
serpent24SubKeys[i++] = r0;
serpent24SubKeys[i++] = r3;
serpent24SubKeys[i++] = r1;
tt = w4 ^ w7 ^ w1 ^ w3 ^ (0x9E3779B9 ^ (12)); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSosemanukEngine.java | GordianKnot Security Framework | 498 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSosemanukEngine.java | GordianKnot Security Framework | 774 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSosemanukEngine.java | GordianKnot Security Framework | 1050 |
tt = w7 ^ w2 ^ w4 ^ w6 ^ (0x9E3779B9 ^ (20 + 3));
w7 = rotateLeft(tt, 11);
r0 = w4;
r1 = w5;
r2 = w6;
r3 = w7;
r2 = ~r2;
r4 = r3;
r3 &= r0;
r0 ^= r4;
r3 ^= r2;
r2 |= r4;
r1 ^= r3;
r2 ^= r0;
r0 |= r1;
r2 ^= r1;
r4 ^= r0;
r0 |= r3;
r0 ^= r2;
r4 ^= r3;
r4 ^= r0;
r3 = ~r3;
r2 &= r4;
r2 ^= r3;
serpent24SubKeys[i++] = r0;
serpent24SubKeys[i++] = r1;
serpent24SubKeys[i++] = r4;
serpent24SubKeys[i++] = r2;
tt = w0 ^ w3 ^ w5 ^ w7 ^ (0x9E3779B9 ^ (24)); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\controls\MoneyWiseXPortfolioAnalysisSelect.java | MoneyWise Personal Finance - Core | 222 |
| net\sourceforge\joceanus\moneywise\atlas\ui\controls\MoneyWiseXSecurityAnalysisSelect.java | MoneyWise Personal Finance - Core | 271 |
if (theState.setPortfolio(thePortButton.getValue())) {
theState.applyState();
theEventManager.fireEvent(PrometheusDataEvent.SELECTIONCHANGED);
}
}
/**
* Build Portfolio menu.
*/
private void buildPortfolioMenu() {
/* Reset the popUp menu */
thePortfolioMenu.removeAllItems();
/* Record active item */
TethysUIScrollItem<MoneyWiseXAnalysisPortfolioBucket> myActive = null;
final MoneyWiseXAnalysisPortfolioBucket myCurr = theState.getPortfolio();
/* Loop through the available portfolio values */
final Iterator<MoneyWiseXAnalysisPortfolioBucket> myIterator = thePortfolios.iterator();
while (myIterator.hasNext()) {
final MoneyWiseXAnalysisPortfolioBucket myBucket = myIterator.next();
/* Create a new MenuItem and add it to the popUp */
final TethysUIScrollItem<MoneyWiseXAnalysisPortfolioBucket> myItem = thePortfolioMenu.addItem(myBucket);
/* If this is the active bucket */
if (myBucket.equals(myCurr)) {
/* Record it */
myActive = myItem;
}
}
/* Ensure active item is visible */
if (myActive != null) {
myActive.scrollToItem();
}
}
/**
* SavePoint values.
*/
private final class MoneyWisePortfolioState { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\panel\MoneyWiseXReportTab.java | MoneyWise Personal Finance - Core | 132 |
| net\sourceforge\joceanus\moneywise\lethe\ui\panel\MoneyWiseReportTab.java | MoneyWise Personal Finance - Core | 125 |
final TethysUIFactory<?> myFactory = pView.getGuiFactory();
/* Create the event manager */
theEventManager = new OceanusEventManager<>();
/* Create the Panel */
final TethysUIPaneFactory myPanes = myFactory.paneFactory();
thePanel = myPanes.newBorderPane();
/* Create the top level debug entry for this view */
final MetisViewerManager myDataMgr = theView.getViewerManager();
final MetisViewerEntry mySection = theView.getViewerEntry(PrometheusViewerEntryId.VIEW);
final MetisViewerEntry myReport = myDataMgr.newEntry(mySection, NLS_DATAENTRY);
theSpotEntry = myDataMgr.newEntry(myReport, PrometheusViewerEntryId.ANALYSIS.toString());
theSpotEntry.setVisible(false);
/* Create the HTML Pane */
theHTMLPane = myFactory.controlFactory().newHTMLManager();
/* Create Report Manager */
theManager = new MetisReportManager<>(new MetisReportHTMLBuilder(pView.getDataFormatter()));
/* Create the report builder */
theBuilder = new MoneyWiseXReportBuilder(theManager); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\lethe\ui\controls\MoneyWisePortfolioAnalysisSelect.java | MoneyWise Personal Finance - Core | 222 |
| net\sourceforge\joceanus\moneywise\lethe\ui\controls\MoneyWiseSecurityAnalysisSelect.java | MoneyWise Personal Finance - Core | 271 |
if (theState.setPortfolio(thePortButton.getValue())) {
theState.applyState();
theEventManager.fireEvent(PrometheusDataEvent.SELECTIONCHANGED);
}
}
/**
* Build Portfolio menu.
*/
private void buildPortfolioMenu() {
/* Reset the popUp menu */
thePortfolioMenu.removeAllItems();
/* Record active item */
TethysUIScrollItem<MoneyWiseAnalysisPortfolioBucket> myActive = null;
final MoneyWiseAnalysisPortfolioBucket myCurr = theState.getPortfolio();
/* Loop through the available portfolio values */
final Iterator<MoneyWiseAnalysisPortfolioBucket> myIterator = thePortfolios.iterator();
while (myIterator.hasNext()) {
final MoneyWiseAnalysisPortfolioBucket myBucket = myIterator.next();
/* Create a new MenuItem and add it to the popUp */
final TethysUIScrollItem<MoneyWiseAnalysisPortfolioBucket> myItem = thePortfolioMenu.addItem(myBucket);
/* If this is the active bucket */
if (myBucket.equals(myCurr)) {
/* Record it */
myActive = myItem;
}
}
/* Ensure active item is visible */
if (myActive != null) {
myActive.scrollToItem();
}
}
/**
* SavePoint values.
*/
private final class MoneyWisePortfolioState { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSosemanukEngine.java | GordianKnot Security Framework | 428 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSosemanukEngine.java | GordianKnot Security Framework | 704 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSosemanukEngine.java | GordianKnot Security Framework | 980 |
tt = w7 ^ w2 ^ w4 ^ w6 ^ (0x9E3779B9 ^ (12 + 3));
w7 = rotateLeft(tt, 11);
r0 = w4;
r1 = w5;
r2 = w6;
r3 = w7;
r3 ^= r0;
r4 = r1;
r1 &= r3;
r4 ^= r2;
r1 ^= r0;
r0 |= r3;
r0 ^= r4;
r4 ^= r3;
r3 ^= r2;
r2 |= r1;
r2 ^= r4;
r4 = ~r4;
r4 |= r1;
r1 ^= r3;
r1 ^= r4;
r3 |= r0;
r1 ^= r3;
r4 ^= r3;
serpent24SubKeys[i++] = r1;
serpent24SubKeys[i++] = r4;
serpent24SubKeys[i++] = r2;
serpent24SubKeys[i++] = r0;
tt = w0 ^ w3 ^ w5 ^ w7 ^ (0x9E3779B9 ^ (16)); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\metis\help\MetisHelpWindow.java | Metis Data Framework | 148 |
| net\sourceforge\joceanus\metis\viewer\MetisViewerWindow.java | Metis Data Framework | 349 |
theDialog.setTitle(MetisHelpResource.TITLE.getValue());
/* Create the help panel */
final TethysUIBorderPaneManager myPanel = theFactory.paneFactory().newBorderPane();
myPanel.setCentre(theSplitTree);
myPanel.setPreferredWidth(WINDOW_WIDTH);
myPanel.setPreferredHeight(WINDOW_HEIGHT);
theDialog.setContent(myPanel);
/* Set listener */
theDialog.getEventRegistrar().addEventListener(TethysUIEvent.WINDOWCLOSED, e -> {
theTree.setVisible(false);
fireEvent(TethysUIEvent.WINDOWCLOSED, null);
});
}
/* If the dialog is not showing */
if (!theDialog.isShowing()) {
/* Make sure that the dialog is showing */
theTree.setVisible(true);
theDialog.showDialog();
}
}
/**
* Hide the dialog.
*/
public void hideDialog() {
/* If the dialog exists */
if (theDialog != null
&& theDialog.isShowing()) {
/* Make sure that the dialog is hidden */
theDialog.hideDialog(); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\controls\MoneyWiseXTaxBasisAnalysisSelect.java | MoneyWise Personal Finance - Core | 237 |
| net\sourceforge\joceanus\moneywise\lethe\ui\controls\MoneyWiseTaxBasisAnalysisSelect.java | MoneyWise Personal Finance - Core | 237 |
MoneyWiseXAnalysisTaxBasisBucket myTaxBasis = myFilter.getBucket();
/* Obtain equivalent bucket */
myTaxBasis = theTaxBases.getMatchingBasis(myTaxBasis);
/* Set the taxBasis */
theState.setTheTaxBasis(myTaxBasis);
theState.setDateRange(myFilter.getDateRange());
theState.applyState();
}
}
/**
* Handle new Basis.
*/
private void handleNewBasis() {
/* Select the new taxBasis */
if (theState.setTaxBasis(theBasisButton.getValue())) {
theState.applyState();
theEventManager.fireEvent(PrometheusDataEvent.SELECTIONCHANGED);
}
}
/**
* Handle new Account.
*/
private void handleNewAccount() {
/* Select the new account */
if (theState.setTaxBasis(theAccountButton.getValue())) {
theState.applyState();
theEventManager.fireEvent(PrometheusDataEvent.SELECTIONCHANGED);
}
}
/**
* Build Basis menu.
*/
private void buildBasisMenu() {
/* Reset the popUp menu */
theTaxMenu.removeAllItems();
/* Record active item */
TethysUIScrollItem<MoneyWiseXAnalysisTaxBasisBucket> myActive = null; | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseDeposit.java | MoneyWise Personal Finance - Core | 208 |
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWisePayee.java | MoneyWise Personal Finance - Core | 228 |
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWisePortfolio.java | MoneyWise Personal Finance - Core | 241 |
? theInfoSet.getValue(MoneyWiseAccountInfoClass.MATURITY, OceanusDate.class)
: null;
}
/**
* Obtain SortCode.
* @return the sort code
*/
public char[] getSortCode() {
return hasInfoSet
? theInfoSet.getValue(MoneyWiseAccountInfoClass.SORTCODE, char[].class)
: null;
}
/**
* Obtain Reference.
* @return the reference
*/
public char[] getReference() {
return hasInfoSet
? theInfoSet.getValue(MoneyWiseAccountInfoClass.REFERENCE, char[].class)
: null;
}
/**
* Obtain Account.
* @return the account
*/
public char[] getAccount() {
return hasInfoSet
? theInfoSet.getValue(MoneyWiseAccountInfoClass.ACCOUNT, char[].class)
: null;
}
/**
* Obtain Notes.
* @return the notes
*/
public char[] getNotes() {
return hasInfoSet
? theInfoSet.getValue(MoneyWiseAccountInfoClass.NOTES, char[].class)
: null;
}
@Override
public OceanusMoney getOpeningBalance() { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\database\MoneyWiseTableCash.java | MoneyWise Personal Finance - Core | 93 |
| net\sourceforge\joceanus\moneywise\database\MoneyWiseTableDeposit.java | MoneyWise Personal Finance - Core | 97 |
| net\sourceforge\joceanus\moneywise\database\MoneyWiseTableLoan.java | MoneyWise Personal Finance - Core | 97 |
| net\sourceforge\joceanus\moneywise\database\MoneyWiseTableSecurity.java | MoneyWise Personal Finance - Core | 97 |
myTableDef.setIntegerValue(iField, pItem.getCategoryId());
} else if (MoneyWiseStaticDataType.CURRENCY.equals(iField)) {
myTableDef.setIntegerValue(iField, pItem.getAssetCurrencyId());
} else if (PrometheusDataResource.DATAITEM_FIELD_NAME.equals(iField)) {
myTableDef.setBinaryValue(iField, pItem.getNameBytes());
} else if (PrometheusDataResource.DATAITEM_FIELD_DESC.equals(iField)) {
myTableDef.setBinaryValue(iField, pItem.getDescBytes());
} else if (MoneyWiseBasicResource.ASSET_CLOSED.equals(iField)) {
myTableDef.setBooleanValue(iField, pItem.isClosed());
} else {
super.setFieldValue(pItem, iField);
}
}
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\ui\dialog\MoneyWiseCashDialog.java | MoneyWise Personal Finance - Core | 447 |
| net\sourceforge\joceanus\moneywise\ui\dialog\MoneyWiseDepositDialog.java | MoneyWise Personal Finance - Core | 463 |
| net\sourceforge\joceanus\moneywise\ui\dialog\MoneyWiseLoanDialog.java | MoneyWise Personal Finance - Core | 406 |
| net\sourceforge\joceanus\moneywise\ui\dialog\MoneyWisePortfolioDialog.java | MoneyWise Personal Finance - Core | 423 |
| net\sourceforge\joceanus\moneywise\ui\dialog\MoneyWiseSecurityDialog.java | MoneyWise Personal Finance - Core | 577 |
final MoneyWiseCurrency myCurr = pCash.getAssetCurrency();
TethysUIScrollItem<MoneyWiseCurrency> myActive = null;
/* Access Currencies */
final MoneyWiseCurrencyList myCurrencies = getDataList(MoneyWiseStaticDataType.CURRENCY, MoneyWiseCurrencyList.class);
/* Loop through the AccountCurrencies */
final Iterator<MoneyWiseCurrency> myIterator = myCurrencies.iterator();
while (myIterator.hasNext()) {
final MoneyWiseCurrency myCurrency = myIterator.next();
/* Ignore deleted or disabled */
final boolean bIgnore = myCurrency.isDeleted() || !myCurrency.getEnabled();
if (bIgnore) {
continue;
}
/* Create a new action for the currency */
final TethysUIScrollItem<MoneyWiseCurrency> myItem = pMenu.addItem(myCurrency);
/* If this is the active currency */
if (myCurrency.equals(myCurr)) {
/* Record it */
myActive = myItem;
}
}
/* Ensure active item is visible */
if (myActive != null) {
myActive.scrollToItem();
}
}
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\ui\dialog\MoneyWisePayeeDialog.java | MoneyWise Personal Finance - Core | 116 |
| net\sourceforge\joceanus\moneywise\ui\dialog\MoneyWisePortfolioDialog.java | MoneyWise Personal Finance - Core | 125 |
myTypeButton.setMenuConfigurator(c -> buildPayeeTypeMenu(c, getItem()));
final Map<Boolean, TethysUIIconMapSet<Boolean>> myMapSets = MoneyWiseIcon.configureLockedIconButton(pFactory);
myClosedButton.setIconMapSet(() -> myMapSets.get(theClosedState));
/* Configure validation checks */
myName.setValidator(this::isValidName);
myDesc.setValidator(this::isValidDesc);
}
/**
* Build account subPanel.
* @param pFactory the GUI factory
*/
private void buildAccountPanel(final TethysUIFactory<?> pFactory) {
/* Create a new panel */
theFieldSet.newPanel(TAB_ACCOUNT);
/* Allocate fields */
final TethysUIFieldFactory myFields = pFactory.fieldFactory();
final TethysUICharArrayEditField mySortCode = myFields.newCharArrayField();
final TethysUICharArrayEditField myAccount = myFields.newCharArrayField();
final TethysUICharArrayEditField myReference = myFields.newCharArrayField();
/* Assign the fields to the panel */
theFieldSet.addField(MoneyWiseAccountInfoClass.SORTCODE, mySortCode, MoneyWisePayee::getSortCode); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianBlake2XEngine.java | GordianKnot Security Framework | 125 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianZuc128Engine.java | GordianKnot Security Framework | 228 |
public int processBytes(final byte[] in,
final int inOff,
final int len,
final byte[] out,
final int outOff) {
/* Check for errors */
if (theResetState == null) {
throw new IllegalStateException(getAlgorithmName() + " not initialised");
}
if ((inOff + len) > in.length) {
throw new DataLengthException("input buffer too short");
}
if ((outOff + len) > out.length) {
throw new OutputLengthException("output buffer too short");
}
/* Loop through the input bytes */
for (int i = 0; i < len; i++) {
out[i + outOff] = returnByte(in[i + inOff]);
}
return len;
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianBlake3Engine.java | GordianKnot Security Framework | 119 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianZuc128Engine.java | GordianKnot Security Framework | 228 |
public int processBytes(final byte[] in,
final int inOff,
final int len,
final byte[] out,
final int outOff) {
/* Check for errors */
if (theResetState == null) {
throw new IllegalStateException(getAlgorithmName() + " not initialised");
}
if ((inOff + len) > in.length) {
throw new DataLengthException("input buffer too short");
}
if ((outOff + len) > out.length) {
throw new OutputLengthException("output buffer too short");
}
/* Loop through the input bytes */
for (int i = 0; i < len; i++) {
out[i + outOff] = returnByte(in[i + inOff]);
}
return len;
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianRabbitEngine.java | GordianKnot Security Framework | 159 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianZuc128Engine.java | GordianKnot Security Framework | 228 |
public int processBytes(final byte[] in,
final int inOff,
final int len,
final byte[] out,
final int outOff) {
/* Check for errors */
if (theResetState == null) {
throw new IllegalStateException(getAlgorithmName() + " not initialised");
}
if ((inOff + len) > in.length) {
throw new DataLengthException("input buffer too short");
}
if ((outOff + len) > out.length) {
throw new OutputLengthException("output buffer too short");
}
/* Loop through the input bytes */
for (int i = 0; i < len; i++) {
out[i + outOff] = returnByte(in[i + inOff]);
}
return len;
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSkeinXofEngine.java | GordianKnot Security Framework | 126 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianZuc128Engine.java | GordianKnot Security Framework | 228 |
public int processBytes(final byte[] in,
final int inOff,
final int len,
final byte[] out,
final int outOff) {
/* Check for errors */
if (theResetState == null) {
throw new IllegalStateException(getAlgorithmName() + " not initialised");
}
if ((inOff + len) > in.length) {
throw new DataLengthException("input buffer too short");
}
if ((outOff + len) > out.length) {
throw new OutputLengthException("output buffer too short");
}
/* Loop through the input bytes */
for (int i = 0; i < len; i++) {
out[i + outOff] = returnByte(in[i + inOff]);
}
return len;
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSnow3GEngine.java | GordianKnot Security Framework | 204 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianZuc128Engine.java | GordianKnot Security Framework | 228 |
public int processBytes(final byte[] in,
final int inOff,
final int len,
final byte[] out,
final int outOff) {
/* Check for errors */
if (theResetState == null) {
throw new IllegalStateException(getAlgorithmName() + " not initialised");
}
if ((inOff + len) > in.length) {
throw new DataLengthException("input buffer too short");
}
if ((outOff + len) > out.length) {
throw new OutputLengthException("output buffer too short");
}
/* Loop through the input bytes */
for (int i = 0; i < len; i++) {
out[i + outOff] = returnByte(in[i + inOff]);
}
return len;
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSosemanukEngine.java | GordianKnot Security Framework | 112 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianZuc128Engine.java | GordianKnot Security Framework | 228 |
public int processBytes(final byte[] in,
final int inOff,
final int len,
final byte[] out,
final int outOff) {
/* Check for errors */
if (theResetState == null) {
throw new IllegalStateException(getAlgorithmName() + " not initialised");
}
if ((inOff + len) > in.length) {
throw new DataLengthException("input buffer too short");
}
if ((outOff + len) > out.length) {
throw new OutputLengthException("output buffer too short");
}
/* Loop through the input bytes */
for (int i = 0; i < len; i++) {
out[i + outOff] = returnByte(in[i + inOff]);
}
return len;
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\jca\JcaSignature.java | GordianKnot Security Framework | 399 |
| net\sourceforge\joceanus\gordianknot\impl\jca\JcaSignature.java | GordianKnot Security Framework | 674 |
JcaSLHDSASignature(final GordianCoreFactory pFactory,
final GordianSignatureSpec pSignatureSpec) throws GordianException {
/* Initialise class */
super(pFactory, pSignatureSpec);
}
@Override
public void initForSigning(final GordianKeyPair pKeyPair) throws GordianException {
/* Determine the required signer */
JcaKeyPair.checkKeyPair(pKeyPair);
final String mySignName = getAlgorithmForKeyPair(pKeyPair);
setSigner(JcaSignatureFactory.getJavaSignature(mySignName, false));
/* pass on call */
super.initForSigning(pKeyPair);
}
@Override
public void initForVerify(final GordianKeyPair pKeyPair) throws GordianException {
/* Determine the required signer */
JcaKeyPair.checkKeyPair(pKeyPair);
final String mySignName = getAlgorithmForKeyPair(pKeyPair);
setSigner(JcaSignatureFactory.getJavaSignature(mySignName, false));
/* pass on call */
super.initForVerify(pKeyPair);
}
/**
* Obtain algorithmName for keyPair.
* @param pKeyPair the keyPair
* @return the name
*/
private static String getAlgorithmForKeyPair(final GordianKeyPair pKeyPair) {
/* Build the algorithm */
final boolean isHash = pKeyPair.getKeyPairSpec().getSLHDSAKeySpec().isHash(); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\controls\MoneyWiseXCashAnalysisSelect.java | MoneyWise Personal Finance - Core | 174 |
| net\sourceforge\joceanus\moneywise\lethe\ui\controls\MoneyWiseCashAnalysisSelect.java | MoneyWise Personal Finance - Core | 174 |
public MoneyWiseXAnalysisCashFilter getFilter() {
return theState.getFilter();
}
@Override
public boolean isAvailable() {
return theCash != null
&& !theCash.isEmpty();
}
/**
* Create SavePoint.
*/
protected void createSavePoint() {
/* Create the savePoint */
theSavePoint = new MoneyWiseCashState(theState);
}
/**
* Restore SavePoint.
*/
protected void restoreSavePoint() {
/* Restore the savePoint */
theState = new MoneyWiseCashState(theSavePoint);
/* Apply the state */
theState.applyState();
}
@Override
public void setEnabled(final boolean bEnabled) {
/* Determine whether there are any Accounts to select */
final boolean csAvailable = bEnabled && isAvailable();
/* Pass call on to buttons */
theCashButton.setEnabled(csAvailable);
theCatButton.setEnabled(csAvailable);
}
@Override
public void setVisible(final boolean pVisible) {
thePanel.setVisible(pVisible);
}
/**
* Set analysis.
* @param pAnalysis the analysis.
*/
public void setAnalysis(final MoneyWiseXAnalysis pAnalysis) { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\controls\MoneyWiseXSecurityAnalysisSelect.java | MoneyWise Personal Finance - Core | 163 |
| net\sourceforge\joceanus\moneywise\lethe\ui\controls\MoneyWiseSecurityAnalysisSelect.java | MoneyWise Personal Finance - Core | 163 |
public MoneyWiseXAnalysisSecurityFilter getFilter() {
return theState.getFilter();
}
@Override
public boolean isAvailable() {
return thePortfolios != null
&& !thePortfolios.isEmpty();
}
/**
* Create SavePoint.
*/
public void createSavePoint() {
/* Create the savePoint */
theSavePoint = new MoneyWiseSecurityState(theState);
}
/**
* Restore SavePoint.
*/
public void restoreSavePoint() {
/* Restore the savePoint */
theState = new MoneyWiseSecurityState(theSavePoint);
/* Apply the state */
theState.applyState();
}
@Override
public void setEnabled(final boolean bEnabled) {
/* Determine whether there are any Securities to select */
final boolean secAvailable = bEnabled && isAvailable();
/* Pass call on to buttons */
theSecButton.setEnabled(secAvailable);
thePortButton.setEnabled(secAvailable);
}
@Override
public void setVisible(final boolean pVisible) {
thePanel.setVisible(pVisible);
}
/**
* Set analysis.
* @param pAnalysis the analysis.
*/
public void setAnalysis(final MoneyWiseXAnalysis pAnalysis) { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\controls\MoneyWiseXSecurityAnalysisSelect.java | MoneyWise Personal Finance - Core | 246 |
| net\sourceforge\joceanus\moneywise\lethe\ui\controls\MoneyWiseSecurityAnalysisSelect.java | MoneyWise Personal Finance - Core | 246 |
final MoneyWiseXAnalysisPortfolioBucket myPortfolio = thePortfolios.getMatchingPortfolio(mySecurity.getPortfolio());
/* Set the security */
theState.setTheSecurity(myPortfolio, mySecurity);
theState.setDateRange(myFilter.getDateRange());
theState.applyState();
}
}
/**
* Handle new Portfolio.
*/
private void handleNewPortfolio() {
/* Select the new portfolio */
if (theState.setPortfolio(thePortButton.getValue())) {
theState.applyState();
theEventManager.fireEvent(PrometheusDataEvent.SELECTIONCHANGED);
}
}
/**
* Handle new Security.
*/
private void handleNewSecurity() {
/* Select the new security */
if (theState.setSecurity(theSecButton.getValue())) {
theState.applyState();
theEventManager.fireEvent(PrometheusDataEvent.SELECTIONCHANGED);
}
}
/**
* Build Portfolio menu.
*/
private void buildPortfolioMenu() {
/* Reset the popUp menu */
thePortfolioMenu.removeAllItems();
/* Record active item */
TethysUIScrollItem<MoneyWiseXAnalysisPortfolioBucket> myActive = null; | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\dialog\MoneyWiseXTransactionDialog.java | MoneyWise Personal Finance - Core | 238 |
| net\sourceforge\joceanus\moneywise\lethe\ui\dialog\MoneyWiseTransactionDialog.java | MoneyWise Personal Finance - Core | 235 |
theFieldSet.addField(MoneyWiseTransInfoClass.TRANSTAG, myTagButton, MoneyWiseXAnalysisEvent::getTransactionTags);
/* Configure the tag button */
myTagButton.setSelectables(this::buildTransactionTags);
/* Set currency */
myAmount.setDeemedCurrency(() -> getItem().getPartner().getCurrency());
}
/**
* Build tax subPanel.
* @param pFactory the GUI factory
*/
private void buildTaxPanel(final TethysUIFactory<?> pFactory) {
/* Create a new panel */
theFieldSet.newPanel(TAB_TAXES);
/* Allocate fields */
final TethysUIFieldFactory myFields = pFactory.fieldFactory();
final TethysUIMoneyEditField myTaxCredit = myFields.newMoneyField();
final TethysUIMoneyEditField myEeNatIns = myFields.newMoneyField();
final TethysUIMoneyEditField myErNatIns = myFields.newMoneyField();
final TethysUIMoneyEditField myBenefit = myFields.newMoneyField();
final TethysUIMoneyEditField myWithheld = myFields.newMoneyField();
final TethysUIIntegerEditField myYears = myFields.newIntegerField();
/* Assign the fields to the panel */
theFieldSet.addField(MoneyWiseTransInfoClass.TAXCREDIT, myTaxCredit, MoneyWiseXAnalysisEvent::getTaxCredit); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\sheets\MoneyWiseSheetLoan.java | MoneyWise Personal Finance - Core | 148 |
| net\sourceforge\joceanus\moneywise\sheets\MoneyWiseSheetPortfolio.java | MoneyWise Personal Finance - Core | 167 |
final String myType = pView.getRowCellByIndex(pRow, ++iAdjust).getString();
/* Skip class */
++iAdjust;
/* Handle closed which may be missing */
PrometheusSheetCell myCell = pView.getRowCellByIndex(pRow, ++iAdjust);
Boolean isClosed = Boolean.FALSE;
if (myCell != null) {
isClosed = myCell.getBoolean();
}
/* Access Parent account */
final String myParent = pView.getRowCellByIndex(pRow, ++iAdjust).getString();
/* Skip alias, portfolio, maturity, openingBalance, symbol and region columns */
++iAdjust;
++iAdjust;
++iAdjust;
++iAdjust;
++iAdjust;
++iAdjust;
/* Handle currency which may be missing */
myCell = pView.getRowCellByIndex(pRow, ++iAdjust);
MoneyWiseCurrency myCurrency = pData.getReportingCurrency();
if (myCell != null) {
final String myCurrName = myCell.getString();
myCurrency = pData.getAccountCurrencies().findItemByName(myCurrName);
}
/* Build data values */
final PrometheusDataValues myValues = new PrometheusDataValues(MoneyWiseLoan.OBJECT_NAME); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\tethys\javafx\button\TethysUIFXDateButtonManager.java | Tethys JavaFX Utilities | 73 |
| net\sourceforge\joceanus\tethys\swing\button\TethysUISwingDateButtonManager.java | Tethys Java Swing Utilities | 85 |
theDialog = new TethysUIFXDateDialog(getConfig());
/* Add listeners */
final OceanusEventRegistrar<TethysUIEvent> myRegistrar = theDialog.getEventRegistrar();
myRegistrar.addEventListener(TethysUIEvent.PREPAREDIALOG, e -> handleDialogRequest());
myRegistrar.addEventListener(TethysUIEvent.NEWVALUE, e -> handleNewValue());
myRegistrar.addEventListener(TethysUIEvent.WINDOWCLOSED, e -> handleNewValue());
}
}
@Override
protected void showDialog() {
/* Make sure that the dialog exists */
ensureDialog();
/* Show the dialog under the node */
theDialog.showDialogUnderNode(getNode().getNode());
}
@Override
public void setPreferredWidth(final Integer pWidth) {
getNode().setPreferredWidth(pWidth);
}
@Override
public void setPreferredHeight(final Integer pHeight) {
getNode().setPreferredHeight(pHeight); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseLoan.java | MoneyWise Personal Finance - Core | 195 |
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWisePayee.java | MoneyWise Personal Finance - Core | 228 |
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWisePortfolio.java | MoneyWise Personal Finance - Core | 241 |
return theInfoSet != null ? theInfoSet.getFieldValue(pFieldId) : null;
}
/**
* Obtain SortCode.
* @return the sort code
*/
public char[] getSortCode() {
return hasInfoSet
? theInfoSet.getValue(MoneyWiseAccountInfoClass.SORTCODE, char[].class)
: null;
}
/**
* Obtain Reference.
* @return the reference
*/
public char[] getReference() {
return hasInfoSet
? theInfoSet.getValue(MoneyWiseAccountInfoClass.REFERENCE, char[].class)
: null;
}
/**
* Obtain Account.
* @return the account
*/
public char[] getAccount() {
return hasInfoSet
? theInfoSet.getValue(MoneyWiseAccountInfoClass.ACCOUNT, char[].class)
: null;
}
/**
* Obtain Notes.
* @return the notes
*/
public char[] getNotes() {
return hasInfoSet
? theInfoSet.getValue(MoneyWiseAccountInfoClass.NOTES, char[].class)
: null;
}
@Override
public OceanusMoney getOpeningBalance() { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\data\validate\MoneyWiseValidateTransDefaults.java | MoneyWise Personal Finance - Core | 641 |
| net\sourceforge\joceanus\moneywise\data\validate\MoneyWiseValidateTransDefaults.java | MoneyWise Personal Finance - Core | 682 |
private MoneyWiseSecurityHolding getDefaultHolding(final MoneyWiseTransCategory pCategory) {
/* Access Portfolios and Holdings Map */
final MoneyWisePortfolioList myPortfolios = theEditSet.getDataList(MoneyWiseBasicDataType.PORTFOLIO, MoneyWisePortfolioList.class);
final MoneyWiseSecurityHoldingMap myMap = myPortfolios.getSecurityHoldingsMap();
/* Loop through the Portfolios */
final Iterator<MoneyWisePortfolio> myPortIterator = myPortfolios.iterator();
while (myPortIterator.hasNext()) {
final MoneyWisePortfolio myPortfolio = myPortIterator.next();
/* Ignore deleted or closed */
if (myPortfolio.isDeleted() || myPortfolio.isClosed()) {
continue;
}
/* Look for existing holdings */
final Iterator<MoneyWiseSecurityHolding> myExistIterator = myMap.existingIterator(myPortfolio);
if (myExistIterator != null) {
/* Loop through them */
while (myExistIterator.hasNext()) {
final MoneyWiseSecurityHolding myHolding = myExistIterator.next();
/* Check whether the asset is allowable for the combination */
if (theValidator.isValidCategory(myHolding, pCategory)) { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\ext\digests\GordianGroestlDigest.java | GordianKnot Security Framework | 72 |
| net\sourceforge\joceanus\gordianknot\impl\ext\digests\GordianJHDigest.java | GordianKnot Security Framework | 72 |
}
@Override
public int getDigestSize() {
return theDigestLen;
}
@Override
public void reset() {
theDigest.reset();
}
@Override
public void update(final byte arg0) {
final byte[] myByte = new byte[] { arg0 };
update(myByte, 0, 1);
}
@Override
public void update(final byte[] pData, final int pOffset, final int pLength) {
theDigest.update(pData, pOffset, ((long) pLength) * Byte.SIZE);
}
@Override
public int getByteLength() {
return theDigest.getBufferSize();
}
@Override
public GordianGroestlDigest copy() { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\panel\MoneyWiseXEventTable.java | MoneyWise Personal Finance - Core | 357 |
| net\sourceforge\joceanus\moneywise\lethe\ui\panel\MoneyWiseTransactionTable.java | MoneyWise Personal Finance - Core | 362 |
.setOnCommit((r, v) -> updateField(MoneyWiseXAnalysisEvent::setPartnerAmount, r, v));
/* Create the debit column */
myTable.declareRawDecimalColumn(MoneyWiseTransDataId.DEBIT)
.setCellValueFactory(this::getFilteredDebit)
.setEditable(false)
.setColumnWidth(WIDTH_MONEY);
/* Create the credit column */
myTable.declareRawDecimalColumn(MoneyWiseTransDataId.CREDIT)
.setCellValueFactory(this::getFilteredCredit)
.setEditable(false)
.setColumnWidth(WIDTH_MONEY);
/* Create the balance column */
myTable.declareRawDecimalColumn(MoneyWiseTransDataId.BALANCE)
.setCellValueFactory(this::getFilteredBalance)
.setEditable(false)
.setColumnWidth(WIDTH_MONEY);
/* Create the Active column */
final TethysUIIconMapSet<MetisAction> myActionMapSet = MetisIcon.configureStatusIconButton(myGuiFactory);
myTable.declareIconColumn(PrometheusDataResource.DATAITEM_TOUCH, MetisAction.class)
.setIconMapSet(r -> myActionMapSet)
.setCellValueFactory(MoneyWiseXEventTable::getFilteredAction) | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\tethys\javafx\base\TethysUIFXUtils.java | Tethys JavaFX Utilities | 328 |
| net\sourceforge\joceanus\tethys\swing\base\TethysUISwingUtils.java | Tethys Java Swing Utilities | 274 |
final Rectangle2D pScreen) {
/* Calculate intersection coordinates */
final double myMinX = Math.max(pBounds.getMinX(), pScreen.getMinX());
final double myMaxX = Math.min(pBounds.getMaxX(), pScreen.getMaxX());
final double myMinY = Math.max(pBounds.getMinY(), pScreen.getMinY());
final double myMaxY = Math.min(pBounds.getMaxY(), pScreen.getMaxY());
/* Calculate intersection lengths */
final double myX = Math.max(myMaxX - myMinX, 0);
final double myY = Math.max(myMaxY - myMinY, 0);
/* Calculate intersection */
return myX * myY;
}
/**
* Adjust display location to fit on screen.
* @param pSource the proposed location
* @param pScreen the screen
* @return the (adjusted) location
*/
private static Rectangle2D adjustDisplayLocation(final Rectangle2D pSource, | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSnow3GEngine.java | GordianKnot Security Framework | 150 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianZuc128Engine.java | GordianKnot Security Framework | 163 |
private GordianSnow3GEngine(final GordianSnow3GEngine pSource) {
reset(pSource);
}
/**
* initialise a Snow3G cipher.
* @param forEncryption whether or not we are for encryption.
* @param params the parameters required to set up the cipher.
* @exception IllegalArgumentException if the params argument is inappropriate.
*/
public void init(final boolean forEncryption,
final CipherParameters params) {
/*
* encryption and decryption is completely symmetrical, so the 'forEncryption' is
* irrelevant. (Like 90% of stream ciphers)
*/
/* Determine parameters */
CipherParameters myParams = params;
byte[] newKey = null;
byte[] newIV = null;
if ((myParams instanceof ParametersWithIV)) {
final ParametersWithIV ivParams = (ParametersWithIV) myParams;
newIV = ivParams.getIV();
myParams = ivParams.getParameters();
}
if (myParams instanceof KeyParameter) {
final KeyParameter keyParam = (KeyParameter) myParams;
newKey = keyParam.getKey();
}
/* Initialise engine and mark as initialised */
theIndex = 0;
theIterations = 0;
setKeyAndIV(newKey, newIV);
/* Save reset state */
theResetState = copy();
}
/**
* Obtain Max iterations.
* @return the maximum iterations
*/
protected int getMaxIterations() {
return 625; | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\reports\MoneyWiseXReportNetWorth.java | MoneyWise Personal Finance - Core | 313 |
| net\sourceforge\joceanus\moneywise\atlas\reports\MoneyWiseXReportNetWorth.java | MoneyWise Personal Finance - Core | 358 |
final MoneyWiseDepositCategory myCurr = myBucket.getAccountCategory();
if (!myBucket.isActive()
|| !MetisDataDifference.isEqual(myCurr.getParentCategory(), myCategory)) {
continue;
}
/* Access bucket name */
final String myName = myBucket.getName();
/* Access values */
final MoneyWiseXAnalysisAccountValues myValues = myBucket.getValues();
/* Create the SubCategory row */
theBuilder.startRow(myTable);
theBuilder.makeDelayLinkCell(myTable, myName, myCurr.getSubCategory());
theBuilder.makeTotalCell(myTable, myValues.getMoneyValue(MoneyWiseXAnalysisAccountAttr.VALUATION));
/* Note the delayed subTable */
setDelayedTable(myName, myTable, myBucket);
}
/* Embed the table correctly */
theBuilder.embedTable(myTable, pCategory.getName());
}
/**
* Build a category report.
* @param pParent the table parent
* @param pCategory the category bucket
*/
private void makeCategoryReport(final MetisHTMLTable pParent,
final MoneyWiseXAnalysisCashCategoryBucket pCategory) { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\reports\MoneyWiseXReportResource.java | MoneyWise Personal Finance - Core | 30 |
| net\sourceforge\joceanus\moneywise\lethe\reports\MoneyWiseReportResource.java | MoneyWise Personal Finance - Core | 30 |
public enum MoneyWiseXReportResource implements OceanusBundleId {
/**
* NetWorth ReportType.
*/
TYPE_NETWORTH("Type.NetWorth"),
/**
* BalanceSheet ReportType.
*/
TYPE_BALANCESHEET("Type.BalanceSheet"),
/**
* CashFlow ReportType.
*/
TYPE_CASHFLOW("Type.CashFlow"),
/**
* IncomeExpense ReportType.
*/
TYPE_INCEXP("Type.IncExp"),
/**
* Portfolio ReportType.
*/
TYPE_PORTFOLIO("Type.Portfolio"),
/**
* MarketGrowth ReportType.
*/
TYPE_MARKET("Type.Market"),
/**
* TaxBasis ReportType.
*/
TYPE_TAXBASIS("Type.TaxBasis"),
/**
* TaxCalc ReportType.
*/
TYPE_TAXCALC("Type.TaxCalc"),
/**
* AssetGains ReportType.
*/
TYPE_ASSETGAINS("Type.AssetGains"),
/**
* CapitalGains ReportType.
*/
TYPE_CAPITALGAINS("Type.CapitalGains"),
/**
* NetWorth Title.
*/
NETWORTH_TITLE("NetWorth.Title"),
/**
* NetWorth Asset.
*/
NETWORTH_ASSET("NetWorth.Asset"),
/**
* BalanceSheet Title.
*/
BALANCESHEET_TITLE("BalanceSheet.Title"),
/**
* CashFlow Title.
*/
CASHFLOW_TITLE("CashFlow.Title"),
/**
* Income/Expense Title.
*/
INCEXP_TITLE("IncExp.Title"),
/**
* Portfolio Title.
*/
PORTFOLIO_TITLE("Portfolio.Title"),
/**
* MarketGrowth Title.
*/
MARKETGROWTH_TITLE("MarketGrowth.Title"),
/**
* MarketGrowth BaseValue.
*/
MARKETGROWTH_BASE("MarketGrowth.Base"),
/**
* AssetGains Title.
*/
ASSETGAINS_TITLE("AssetGains.Title"),
/**
* CapitalGains Title.
*/
CAPITALGAINS_TITLE("CapitalGains.Title"),
/**
* TaxBasis Title.
*/
TAXBASIS_TITLE("TaxBasis.Title"),
/**
* TaxCalc Title.
*/
TAXCALC_TITLE("TaxCalc.Title");
/**
* The Report Map.
*/
private static final Map<MoneyWiseXReportType, OceanusBundleId> REPORT_MAP = buildReportMap(); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\controls\MoneyWiseXAnalysisSelect.java | MoneyWise Personal Finance - Core | 1239 |
| net\sourceforge\joceanus\moneywise\lethe\ui\controls\MoneyWiseAnalysisSelect.java | MoneyWise Personal Finance - Core | 1259 |
private void setFilter(final MoneyWiseXAnalysisFilter<?, ?> pFilter) {
theFilter = pFilter;
}
/**
* Apply the State.
*/
private void applyState() {
/* Adjust the lock-down */
setEnabled(true);
theRangeButton.setText(theRange.toString());
theFilterButton.setText((theFilter == null)
? null
: theFilter.getName());
theFilterTypeButton.setValue(theType);
theBucketButton.setValue(theBucket);
theColumnButton.setValue(theColumns);
showColumns(showColumns);
}
/**
* Show Columns.
* @param pShow true/false
*/
private void showColumns(final boolean pShow) {
/* Show columns */
theColumnLabel.setVisible(pShow);
theColumnButton.setVisible(pShow);
/* Hide buckets */
theBucketLabel.setVisible(!pShow);
theBucketButton.setVisible(!pShow);
/* Record details */
showColumns = pShow;
}
}
/**
* The Statement Select class.
*/
public static final class MoneyWiseXStatementSelect { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\lethe\reports\MoneyWiseReportNetWorth.java | MoneyWise Personal Finance - Core | 313 |
| net\sourceforge\joceanus\moneywise\lethe\reports\MoneyWiseReportNetWorth.java | MoneyWise Personal Finance - Core | 358 |
final MoneyWiseDepositCategory myCurr = myBucket.getAccountCategory();
if (!myBucket.isActive()
|| !MetisDataDifference.isEqual(myCurr.getParentCategory(), myCategory)) {
continue;
}
/* Access bucket name */
final String myName = myBucket.getName();
/* Access values */
final MoneyWiseAnalysisAccountValues myValues = myBucket.getValues();
/* Create the SubCategory row */
theBuilder.startRow(myTable);
theBuilder.makeDelayLinkCell(myTable, myName, myCurr.getSubCategory());
theBuilder.makeTotalCell(myTable, myValues.getMoneyValue(MoneyWiseAnalysisAccountAttr.VALUATION));
/* Note the delayed subTable */
setDelayedTable(myName, myTable, myBucket);
}
/* Embed the table correctly */
theBuilder.embedTable(myTable, pCategory.getName());
}
/**
* Build a category report.
* @param pParent the table parent
* @param pCategory the category bucket
*/
private void makeCategoryReport(final MetisHTMLTable pParent,
final MoneyWiseAnalysisCashCategoryBucket pCategory) { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\tethys\javafx\field\TethysUIFXScrollButtonField.java | Tethys JavaFX Utilities | 93 |
| net\sourceforge\joceanus\tethys\swing\field\TethysUISwingScrollButtonField.java | Tethys Java Swing Utilities | 102 |
pManager.getEventRegistrar().addEventListener(this::handleEvent);
/* Set configurator */
theConfigurator = p -> {
};
}
@Override
public T getCastValue(final Object pValue) {
return theManager.getValueClass().cast(pValue);
}
/**
* handle Scroll Button event.
*
* @param pEvent the even
*/
private void handleEvent(final OceanusEvent<TethysUIEvent> pEvent) {
switch (pEvent.getEventId()) {
case NEWVALUE:
setValue(theManager.getValue());
fireEvent(TethysUIEvent.NEWVALUE, pEvent.getDetails());
break;
case EDITFOCUSLOST:
haltCellEditing();
break;
default:
break;
}
}
@Override
public void setMenuConfigurator(final Consumer<TethysUIScrollMenu<T>> pConfigurator) {
theConfigurator = pConfigurator;
theManager.setMenuConfigurator(theConfigurator);
}
@Override | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\quicken\file\MoneyWiseQIFPortfolioBuilder.java | MoneyWise Personal Finance - Core | 1224 |
| net\sourceforge\joceanus\moneywise\quicken\file\MoneyWiseQIFPortfolioBuilder.java | MoneyWise Personal Finance - Core | 1365 |
final MoneyWiseQIFAccountEvents myTarget = theFile.registerAccount(pTarget);
/* Obtain classes */
final List<MoneyWiseQIFClass> myList = theBuilder.getTransactionClasses(pTrans);
/* Create an XOut event */
MoneyWiseQIFPortfolioEvent myEvent = new MoneyWiseQIFPortfolioEvent(theFile, pTrans, MoneyWiseQActionType.XOUT);
myEvent.recordAmount(myAmount);
myEvent.recordPayee(theBuilder.buildXferToPayee(pTarget));
myEvent.recordXfer(myTarget.getAccount(), myList, myAmount);
/* Add to event list */
mySource.addEvent(myEvent);
/* Create an XIn event */
myEvent = new MoneyWiseQIFPortfolioEvent(theFile, pTrans, MoneyWiseQActionType.XIN);
myEvent.recordAmount(myAmount);
myEvent.recordPayee(theBuilder.buildXferFromPayee(pSource));
myEvent.recordXfer(mySource.getAccount(), myList, myAmount);
/* Add to event list */
myTarget.addEvent(myEvent);
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSosemanukEngine.java | GordianKnot Security Framework | 362 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSosemanukEngine.java | GordianKnot Security Framework | 638 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSosemanukEngine.java | GordianKnot Security Framework | 914 |
tt = w7 ^ w2 ^ w4 ^ w6 ^ (0x9E3779B9 ^ (4 + 3));
w7 = rotateLeft(tt, 11);
r0 = w4;
r1 = w5;
r2 = w6;
r3 = w7;
r4 = r0;
r0 &= r2;
r0 ^= r3;
r2 ^= r1;
r2 ^= r0;
r3 |= r4;
r3 ^= r1;
r4 ^= r2;
r1 = r3;
r3 |= r4;
r3 ^= r0;
r0 &= r1;
r4 ^= r0;
r1 ^= r3;
r1 ^= r4;
r4 = ~r4;
serpent24SubKeys[i++] = r2;
serpent24SubKeys[i++] = r3;
serpent24SubKeys[i++] = r1;
serpent24SubKeys[i++] = r4;
tt = w0 ^ w3 ^ w5 ^ w7 ^ (0x9E3779B9 ^ (8)); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\ext\macs\GordianBlake2Mac.java | GordianKnot Security Framework | 63 |
| net\sourceforge\joceanus\gordianknot\impl\ext\macs\GordianBlake3Mac.java | GordianKnot Security Framework | 62 |
throw new IllegalArgumentException("Blake2Mac requires a key parameter.");
}
/* Configure the digest */
theDigest.init(myBlakeParams);
}
@Override
public int getMacSize() {
return theDigest.getDigestSize();
}
@Override
public void update(final byte in) {
theDigest.update(in);
}
@Override
public void update(final byte[] in, final int inOff, final int len) {
theDigest.update(in, inOff, len);
}
@Override
public int doFinal(final byte[] out, final int outOff) {
return theDigest.doFinal(out, outOff);
}
@Override
public void reset() {
theDigest.reset();
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\jca\JcaAgreement.java | GordianKnot Security Framework | 434 |
| net\sourceforge\joceanus\gordianknot\impl\jca\JcaAgreement.java | GordianKnot Security Framework | 539 |
theAgreement.doPhase(myTarget.getPublicKey(), true);
storeSecret(theAgreement.generateSecret());
} catch (InvalidKeyException
| InvalidAlgorithmParameterException e) {
throw new GordianCryptoException(ERR_AGREEMENT, e);
}
}
/**
* Establish the agreement.
* @param pKeyPair the keyPair
* @throws GordianException on error
*/
private void establishAgreement(final GordianKeyPair pKeyPair) throws GordianException {
if (getAgreementSpec().getKeyPairSpec().getKeyPairType().equals(GordianKeyPairType.XDH)) {
final String myBase = pKeyPair.getKeyPairSpec().toString();
final String myName = JcaAgreementFactory.getFullAgreementName(myBase, getAgreementSpec());
theAgreement = JcaAgreementFactory.getJavaKeyAgreement(myName, false);
}
}
}
/**
* Jca Signed Agreement.
*/
public static class JcaSignedAgreement | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\reports\MoneyWiseXReportBalanceSheet.java | MoneyWise Personal Finance - Core | 762 |
| net\sourceforge\joceanus\moneywise\atlas\reports\MoneyWiseXReportNetWorth.java | MoneyWise Personal Finance - Core | 782 |
setFilterForId(myFullName, myBucket);
}
/* Return the table */
return myTable;
}
@Override
public MoneyWiseXAnalysisFilter<?, ?> processFilter(final Object pSource) {
/* If this is a DepositBucket */
if (pSource instanceof MoneyWiseXAnalysisDepositBucket) {
/* Create the new filter */
return new MoneyWiseXAnalysisDepositFilter((MoneyWiseXAnalysisDepositBucket) pSource);
}
/* If this is a CashBucket */
if (pSource instanceof MoneyWiseXAnalysisCashBucket) {
/* Create the new filter */
return new MoneyWiseXAnalysisCashFilter((MoneyWiseXAnalysisCashBucket) pSource);
}
/* If this is a LoanBucket */
if (pSource instanceof MoneyWiseXAnalysisLoanBucket) {
/* Create the new filter */
return new MoneyWiseXAnalysisLoanFilter((MoneyWiseXAnalysisLoanBucket) pSource);
}
/* If this is a SecurityBucket */
if (pSource instanceof MoneyWiseXAnalysisSecurityBucket) {
/* Create the new filter */
return new MoneyWiseXAnalysisSecurityFilter((MoneyWiseXAnalysisSecurityBucket) pSource);
}
/* If this is a PortfolioBucket */
if (pSource instanceof MoneyWiseXAnalysisPortfolioBucket) {
/* Create the new filter */
return new MoneyWiseXAnalysisPortfolioCashFilter((MoneyWiseXAnalysisPortfolioBucket) pSource);
}
return null;
}
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\panel\MoneyWiseXEventTable.java | MoneyWise Personal Finance - Core | 965 |
| net\sourceforge\joceanus\moneywise\lethe\ui\panel\MoneyWiseTransactionTable.java | MoneyWise Personal Finance - Core | 973 |
myTable.getColumn(MoneyWiseTransInfoClass.RETURNEDCASH).setVisible(false);
}
/**
* Analysis Header class.
*/
private static class AnalysisHeader
extends MoneyWiseTransaction {
/**
* Analysis Header Id.
*/
static final int ID_VALUE = 1;
/**
* Constructor.
* @param pList the Transaction list
*/
protected AnalysisHeader(final MoneyWiseTransactionList pList) {
super(pList);
setHeader(true);
setIndexedId(ID_VALUE);
}
}
/**
* Transaction DataIds.
*/
private enum MoneyWiseTransDataId
implements MetisDataFieldId {
/**
* Debit.
*/
DEBIT(MoneyWiseUIResource.STATEMENT_COLUMN_DEBIT),
/**
* Credit.
*/
CREDIT(MoneyWiseUIResource.STATEMENT_COLUMN_CREDIT),
/**
* Balance.
*/
BALANCE(MoneyWiseUIResource.STATEMENT_COLUMN_BALANCE);
/**
* The Value.
*/
private final String theValue;
/**
* Constructor.
* @param pKeyName the key name
*/
MoneyWiseTransDataId(final MetisDataFieldId pKeyName) {
theValue = pKeyName.getId();
}
@Override
public String getId() {
return theValue;
}
@Override
public String toString() {
return getId();
}
}
/**
* Transaction Panel.
*/
public static class MoneyWiseXStatementPanel | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\database\MoneyWiseTableDeposit.java | MoneyWise Personal Finance - Core | 77 |
| net\sourceforge\joceanus\moneywise\database\MoneyWiseTableLoan.java | MoneyWise Personal Finance - Core | 77 |
| net\sourceforge\joceanus\moneywise\database\MoneyWiseTablePortfolio.java | MoneyWise Personal Finance - Core | 77 |
| net\sourceforge\joceanus\moneywise\database\MoneyWiseTableSecurity.java | MoneyWise Personal Finance - Core | 77 |
final PrometheusDataValues myValues = getRowValues(MoneyWiseDeposit.OBJECT_NAME);
myValues.addValue(PrometheusDataResource.DATAITEM_FIELD_NAME, myTableDef.getBinaryValue(PrometheusDataResource.DATAITEM_FIELD_NAME));
myValues.addValue(PrometheusDataResource.DATAITEM_FIELD_DESC, myTableDef.getBinaryValue(PrometheusDataResource.DATAITEM_FIELD_DESC));
myValues.addValue(MoneyWiseBasicResource.CATEGORY_NAME, myTableDef.getIntegerValue(MoneyWiseBasicResource.CATEGORY_NAME));
myValues.addValue(MoneyWiseBasicResource.ASSET_PARENT, myTableDef.getIntegerValue(MoneyWiseBasicResource.ASSET_PARENT));
myValues.addValue(MoneyWiseStaticDataType.CURRENCY, myTableDef.getIntegerValue(MoneyWiseStaticDataType.CURRENCY));
myValues.addValue(MoneyWiseBasicResource.ASSET_CLOSED, myTableDef.getBooleanValue(MoneyWiseBasicResource.ASSET_CLOSED));
/* Return the values */
return myValues;
}
@Override
protected void setFieldValue(final MoneyWiseDeposit pItem, | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\lethe\reports\MoneyWiseReportBalanceSheet.java | MoneyWise Personal Finance - Core | 762 |
| net\sourceforge\joceanus\moneywise\lethe\reports\MoneyWiseReportNetWorth.java | MoneyWise Personal Finance - Core | 782 |
setFilterForId(myFullName, myBucket);
}
/* Return the table */
return myTable;
}
@Override
public MoneyWiseAnalysisFilter<?, ?> processFilter(final Object pSource) {
/* If this is a DepositBucket */
if (pSource instanceof MoneyWiseAnalysisDepositBucket) {
/* Create the new filter */
return new MoneyWiseAnalysisDepositFilter((MoneyWiseAnalysisDepositBucket) pSource);
}
/* If this is a CashBucket */
if (pSource instanceof MoneyWiseAnalysisCashBucket) {
/* Create the new filter */
return new MoneyWiseAnalysisCashFilter((MoneyWiseAnalysisCashBucket) pSource);
}
/* If this is a LoanBucket */
if (pSource instanceof MoneyWiseAnalysisLoanBucket) {
/* Create the new filter */
return new MoneyWiseAnalysisLoanFilter((MoneyWiseAnalysisLoanBucket) pSource);
}
/* If this is a SecurityBucket */
if (pSource instanceof MoneyWiseAnalysisSecurityBucket) {
/* Create the new filter */
return new MoneyWiseAnalysisSecurityFilter((MoneyWiseAnalysisSecurityBucket) pSource);
}
/* If this is a PortfolioBucket */
if (pSource instanceof MoneyWiseAnalysisPortfolioBucket) {
/* Create the new filter */
return new MoneyWiseAnalysisPortfolioCashFilter((MoneyWiseAnalysisPortfolioBucket) pSource);
}
return null;
}
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\sheets\MoneyWiseSheetDeposit.java | MoneyWise Personal Finance - Core | 144 |
| net\sourceforge\joceanus\moneywise\sheets\MoneyWiseSheetLoan.java | MoneyWise Personal Finance - Core | 141 |
protected static void processDeposit(final MoneyWiseArchiveLoader pLoader,
final MoneyWiseDataSet pData,
final PrometheusSheetView pView,
final PrometheusSheetRow pRow) throws OceanusException {
/* Access name and type */
int iAdjust = -1;
final String myName = pView.getRowCellByIndex(pRow, ++iAdjust).getString();
final String myType = pView.getRowCellByIndex(pRow, ++iAdjust).getString();
/* Skip class */
++iAdjust;
/* Handle closed which may be missing */
PrometheusSheetCell myCell = pView.getRowCellByIndex(pRow, ++iAdjust);
Boolean isClosed = Boolean.FALSE;
if (myCell != null) {
isClosed = myCell.getBoolean();
}
/* Access Parent account */
final String myParent = pView.getRowCellByIndex(pRow, ++iAdjust).getString();
/* Skip alias and portfolio columns */
++iAdjust;
++iAdjust; | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\ui\dialog\MoneyWiseDepositDialog.java | MoneyWise Personal Finance - Core | 151 |
| net\sourceforge\joceanus\moneywise\ui\dialog\MoneyWisePortfolioDialog.java | MoneyWise Personal Finance - Core | 123 |
myCategoryButton.setMenuConfigurator(c -> buildCategoryMenu(c, getItem()));
myParentButton.setMenuConfigurator(c -> buildParentMenu(c, getItem()));
myCurrencyButton.setMenuConfigurator(c -> buildCurrencyMenu(c, getItem()));
final Map<Boolean, TethysUIIconMapSet<Boolean>> myMapSets = MoneyWiseIcon.configureLockedIconButton(pFactory);
myClosedButton.setIconMapSet(() -> myMapSets.get(theClosedState));
/* Configure validation checks */
myName.setValidator(this::isValidName);
myDesc.setValidator(this::isValidDesc);
}
/**
* Build account subPanel.
* @param pFactory the GUI factory
*/
private void buildAccountPanel(final TethysUIFactory<?> pFactory) {
/* Create a new panel */
theFieldSet.newPanel(TAB_ACCOUNT);
/* Allocate fields */
final TethysUIFieldFactory myFields = pFactory.fieldFactory();
final TethysUIDateButtonField myMaturity = myFields.newDateField(); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\prometheus\threads\PrometheusThreadCreateBackup.java | Prometheus Core Application Framework | 69 |
| net\sourceforge\joceanus\prometheus\threads\PrometheusThreadCreateXMLFile.java | Prometheus Core Application Framework | 82 |
return PrometheusThreadId.CREATEBACKUP.toString();
}
@Override
public Void performTask(final TethysUIThreadManager pManager) throws OceanusException {
/* Access the thread manager */
final PrometheusToolkit myPromToolkit = (PrometheusToolkit) pManager.getThreadData();
final PrometheusSecurityPasswordManager myPasswordMgr = myPromToolkit.getPasswordManager();
boolean doDelete = false;
File myFile = null;
try {
/* Initialise the status window */
pManager.initTask(getTaskName());
/* Access the Backup preferences */
final MetisPreferenceManager myMgr = theControl.getPreferenceManager();
final PrometheusBackupPreferences myProperties = myMgr.getPreferenceSet(PrometheusBackupPreferences.class);
/* Determine the archive name */
final String myBackupDir = myProperties.getStringValue(PrometheusBackupPreferenceKey.BACKUPDIR);
final String myPrefix = myProperties.getStringValue(PrometheusBackupPreferenceKey.BACKUPPFIX);
final boolean doTimeStamp = myProperties.getBooleanValue(PrometheusBackupPreferenceKey.BACKUPTIME);
final PrometheusSheetWorkBookType myType = myProperties.getEnumValue(PrometheusBackupPreferenceKey.BACKUPTYPE, PrometheusSheetWorkBookType.class); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\controls\MoneyWiseXPortfolioAnalysisSelect.java | MoneyWise Personal Finance - Core | 132 |
| net\sourceforge\joceanus\moneywise\lethe\ui\controls\MoneyWisePortfolioAnalysisSelect.java | MoneyWise Personal Finance - Core | 132 |
public MoneyWiseXAnalysisPortfolioCashFilter getFilter() {
return theState.getFilter();
}
@Override
public boolean isAvailable() {
return thePortfolios != null
&& !thePortfolios.isEmpty();
}
/**
* Create SavePoint.
*/
public void createSavePoint() {
/* Create the savePoint */
theSavePoint = new MoneyWisePortfolioState(theState);
}
/**
* Restore SavePoint.
*/
public void restoreSavePoint() {
/* Restore the savePoint */
theState = new MoneyWisePortfolioState(theSavePoint);
/* Apply the state */
theState.applyState();
}
@Override
public void setEnabled(final boolean bEnabled) {
/* Determine whether there are any portfolios to select */
final boolean portAvailable = bEnabled && isAvailable();
/* Pass call on to buttons */
thePortButton.setEnabled(portAvailable);
}
@Override
public void setVisible(final boolean pVisible) {
thePanel.setVisible(pVisible);
}
/**
* Set analysis.
* @param pAnalysis the analysis.
*/
public void setAnalysis(final MoneyWiseXAnalysis pAnalysis) { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\controls\MoneyWiseXTransTagSelect.java | MoneyWise Personal Finance - Core | 130 |
| net\sourceforge\joceanus\moneywise\lethe\ui\controls\MoneyWiseTransTagSelect.java | MoneyWise Personal Finance - Core | 130 |
public MoneyWiseXAnalysisTagFilter getFilter() {
return theState.getFilter();
}
@Override
public boolean isAvailable() {
return theTags != null
&& !theTags.isEmpty();
}
/**
* Create SavePoint.
*/
protected void createSavePoint() {
/* Create the savePoint */
theSavePoint = new MoneyWiseTagState(theState);
}
/**
* Restore SavePoint.
*/
protected void restoreSavePoint() {
/* Restore the savePoint */
theState = new MoneyWiseTagState(theSavePoint);
/* Apply the state */
theState.applyState();
}
@Override
public void setEnabled(final boolean bEnabled) {
/* Determine whether there are any Accounts to select */
final boolean csAvailable = bEnabled && isAvailable();
/* Pass call on to buttons */
theTagButton.setEnabled(csAvailable);
}
@Override
public void setVisible(final boolean pVisible) {
thePanel.setVisible(pVisible);
}
/**
* Set analysis.
* @param pAnalysis the analysis.
*/
public void setAnalysis(final MoneyWiseXAnalysis pAnalysis) { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\ui\panel\MoneyWiseAccountPanel.java | MoneyWise Personal Finance - Core | 182 |
| net\sourceforge\joceanus\moneywise\ui\panel\MoneyWiseCategoryPanel.java | MoneyWise Personal Finance - Core | 174 |
MoneyWiseAccountPanel(final MoneyWiseView pView) {
/* Store details */
theView = pView;
/* Access GUI Factory */
final TethysUIFactory<?> myFactory = pView.getGuiFactory();
final MetisViewerManager myViewer = pView.getViewerManager();
/* Create the event manager */
theEventManager = new OceanusEventManager<>();
/* Build the Update set */
theEditSet = new PrometheusEditSet(pView);
/* Create the Panel */
final TethysUIPaneFactory myPanes = myFactory.paneFactory();
thePanel = myPanes.newBorderPane();
/* Create the top level viewer entry for this view */
final MetisViewerEntry mySection = pView.getViewerEntry(PrometheusViewerEntryId.MAINTENANCE);
theViewerEntry = myViewer.newEntry(mySection, NLS_DATAENTRY);
theViewerEntry.setTreeObject(theEditSet);
/* Create the error panel */
theError = pView.getToolkit().getToolkit().newErrorPanel(theViewerEntry);
/* Create the action buttons panel */
theActionButtons = new PrometheusActionButtons(myFactory, theEditSet); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\oceanus\decimal\OceanusDecimal.java | Oceanus Java Core Utilities | 324 |
| net\sourceforge\joceanus\oceanus\decimal\OceanusNewDecimal.java | Oceanus Java Core Utilities | 448 |
protected static long adjustDecimals(final long pValue,
final int iAdjust) {
/* Take a copy of the value */
long myValue = pValue;
/* If we need to reduce decimals */
if (iAdjust < 0) {
/* If we have more than one decimal to remove */
if (iAdjust + 1 < 0) {
/* Calculate division factor (minus one) */
final long myFactor = getFactor(-(iAdjust + 1));
/* Reduce to 10 times required value */
myValue /= myFactor;
}
/* Access last digit */
long myDigit = myValue
% RADIX_TEN;
/* Handle negatiove values */
int myAdjust = 1;
if (myDigit < 0) {
myAdjust = -1;
myDigit = -myDigit;
}
/* Reduce final decimal and round up if required */
myValue /= RADIX_TEN;
if (myDigit >= (RADIX_TEN >> 1)) {
myValue += myAdjust;
}
/* else if we need to expand fractional product */
} else if (iAdjust > 0) {
myValue *= getFactor(iAdjust);
}
/* Return the adjusted value */
return myValue;
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\tethys\javafx\button\TethysUIFXIconButtonManager.java | Tethys JavaFX Utilities | 50 |
| net\sourceforge\joceanus\tethys\swing\button\TethysUISwingIconButtonManager.java | Tethys Java Swing Utilities | 47 |
getNode().setVisible(pVisible);
}
@Override
public void setPreferredWidth(final Integer pWidth) {
getNode().setPreferredWidth(pWidth);
}
@Override
public void setPreferredHeight(final Integer pHeight) {
getNode().setPreferredHeight(pHeight);
}
@Override
public void setBorderPadding(final Integer pPadding) {
super.setBorderPadding(pPadding);
getNode().createWrapperPane(getBorderTitle(), getBorderPadding());
}
@Override
public void setBorderTitle(final String pTitle) {
super.setBorderTitle(pTitle);
getNode().createWrapperPane(getBorderTitle(), getBorderPadding());
}
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\bc\BouncyEdDSAKeyPair.java | GordianKnot Security Framework | 465 |
| net\sourceforge\joceanus\gordianknot\impl\bc\BouncySM2KeyPair.java | GordianKnot Security Framework | 103 |
theSigner.init(false, myPublic.getPublicKey());
}
@Override
public void update(final byte[] pBytes,
final int pOffset,
final int pLength) {
theSigner.update(pBytes, pOffset, pLength);
}
@Override
public void update(final byte pByte) {
theSigner.update(pByte);
}
@Override
public void update(final byte[] pBytes) {
theSigner.update(pBytes, 0, pBytes.length);
}
@Override
public void reset() {
theSigner.reset();
}
@Override
protected BouncyKeyPair getKeyPair() {
return (BouncyKeyPair) super.getKeyPair();
}
@Override
public BouncyFactory getFactory() { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\bc\BouncyMLDSAKeyPair.java | GordianKnot Security Framework | 326 |
| net\sourceforge\joceanus\gordianknot\impl\bc\BouncySM2KeyPair.java | GordianKnot Security Framework | 103 |
theSigner.init(false, myPublic.getPublicKey());
}
@Override
public void update(final byte[] pBytes,
final int pOffset,
final int pLength) {
theSigner.update(pBytes, pOffset, pLength);
}
@Override
public void update(final byte pByte) {
theSigner.update(pByte);
}
@Override
public void update(final byte[] pBytes) {
theSigner.update(pBytes, 0, pBytes.length);
}
@Override
public void reset() {
theSigner.reset();
}
@Override
protected BouncyKeyPair getKeyPair() {
return (BouncyKeyPair) super.getKeyPair();
}
@Override
public BouncyFactory getFactory() { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\core\agree\GordianCoreAgreementFactory.java | GordianKnot Security Framework | 287 |
| net\sourceforge\joceanus\gordianknot\impl\core\agree\GordianCoreAgreementFactory.java | GordianKnot Security Framework | 300 |
case GOST2012:
myAgreements.addAll(listAllKDFs(pKeyPairSpec, GordianAgreementType.ANON));
myAgreements.addAll(listAllKDFs(pKeyPairSpec, GordianAgreementType.KEM));
myAgreements.addAll(listAllKDFs(pKeyPairSpec, GordianAgreementType.BASIC));
myAgreements.addAll(listAllKDFs(pKeyPairSpec, GordianAgreementType.SIGNED));
myAgreements.addAll(listAllKDFs(pKeyPairSpec, GordianAgreementType.UNIFIED));
myAgreements.addAll(listAllKDFs(pKeyPairSpec, GordianAgreementType.UNIFIED, Boolean.TRUE));
myAgreements.addAll(listAllKDFs(pKeyPairSpec, GordianAgreementType.MQV));
myAgreements.addAll(listAllKDFs(pKeyPairSpec, GordianAgreementType.MQV, Boolean.TRUE)); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\ext\digests\GordianBlake2Tree.java | GordianKnot Security Framework | 162 |
| net\sourceforge\joceanus\gordianknot\impl\ext\digests\GordianSkeinTree.java | GordianKnot Security Framework | 181 |
}
/**
* Process data.
* @param pIn the input buffer
* @param pInOffSet the starting offset in the input buffer
* @param pLen the length of data to process
*/
private void processData(final byte[] pIn,
final int pInOffSet,
final int pLen) {
/* Cannot process further data once tree is built */
if (theStore.treeBuilt()) {
throw new IllegalStateException("Tree has been built");
}
/* Determine space in current block */
final int blkSize = getLeafLen();
final int mySpace = blkSize - theProcessed;
/* If all data can be processed by the current leaf */
if (mySpace >= pLen) {
/* Update and return */
theDigest.update(pIn, pInOffSet, pLen);
theProcessed += pLen;
return;
}
/* Process as much as possible into current leaf */
if (mySpace > 0) {
theDigest.update(pIn, pInOffSet, mySpace);
theProcessed += mySpace;
}
/* Loop while we have data remaining */
int myProcessed = mySpace;
while (myProcessed < pLen) {
/* If the current leaf is full */
if (theProcessed == blkSize) {
/* Finalise the leaf and process the result */
theDigest.doFinal(theHash, 0); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\ext\digests\GordianBlake2Tree.java | GordianKnot Security Framework | 398 |
| net\sourceforge\joceanus\gordianknot\impl\ext\digests\GordianSkeinTree.java | GordianKnot Security Framework | 475 |
return myResult.length;
}
/**
* Calculate tree result.
* @param pOut the output buffer
* @param pOutOffset the offset into the output buffer
* @return the number of bytes returned
*/
int calculateTree(final byte[] pOut,
final int pOutOffset) {
/* Check parameters */
if (pOut.length < pOutOffset + theResult.length) {
throw new OutputLengthException("Insufficient output buffer");
}
if (treeBuilt) {
throw new IllegalStateException("tree already built");
}
/* Access the only level */
SimpleVector myLevel = (SimpleVector) theHashes.lastElement();
/* While we have elements that must be reduced */
while (myLevel.size() > 1) {
/* Calculate the next set of hashes */
myLevel = calculateNextLevel(myLevel);
theHashes.addElement(myLevel);
}
/* Note that the tree has been built */
treeBuilt = true;
/* Return the final hash */
return obtainResult(pOut, pOutOffset);
}
/**
* Calculate next level.
* @param pInput the current set of hashes
* @return the next level
*/
private SimpleVector calculateNextLevel(final SimpleVector pInput) {
/* Set the depth of the tree */
final int myCurDepth = theHashes.size(); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\jca\JcaAEADCipher.java | GordianKnot Security Framework | 68 |
| net\sourceforge\joceanus\gordianknot\impl\jca\JcaCipher.java | GordianKnot Security Framework | 69 |
JcaAEADCipher(final JcaFactory pFactory,
final GordianCipherSpec<T> pCipherSpec,
final Cipher pCipher) {
super(pFactory, pCipherSpec);
theCipher = pCipher;
}
@Override
public JcaKey<T> getKey() {
return (JcaKey<T>) super.getKey();
}
@Override
public void init(final boolean pEncrypt,
final GordianCipherParameters pParams) throws GordianException {
/* Process the parameters and access the key */
processParameters(pParams);
final JcaKey<T> myJcaKey = JcaKey.accessKey(getKey());
/* Access details */
final int myMode = pEncrypt
? Cipher.ENCRYPT_MODE
: Cipher.DECRYPT_MODE;
final SecretKey myKey = myJcaKey.getKey();
final byte[] myAEAD = getInitialAEAD(); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\reports\MoneyWiseXReportPortfolioView.java | MoneyWise Personal Finance - Core | 110 |
| net\sourceforge\joceanus\moneywise\lethe\reports\MoneyWiseReportPortfolioView.java | MoneyWise Personal Finance - Core | 110 |
final MoneyWiseXAnalysisPortfolioBucket myTotals = myPortfolios.getTotals();
final OceanusDate myDate = pAnalysis.getDateRange().getEnd();
/* Start the report */
final Element myBody = theBuilder.startReport();
theBuilder.makeTitle(myBody, TEXT_TITLE, theFormatter.formatObject(myDate));
/* Initialise the table */
final MetisHTMLTable myTable = theBuilder.startTable(myBody);
theBuilder.startHdrRow(myTable);
theBuilder.makeTitleCell(myTable);
theBuilder.makeTitleCell(myTable, TEXT_VALUE);
theBuilder.makeTitleCell(myTable, TEXT_COST);
theBuilder.makeTitleCell(myTable, TEXT_GAINS);
theBuilder.makeTitleCell(myTable, TEXT_DIVIDEND);
theBuilder.makeTitleCell(myTable, TEXT_ADJUST);
theBuilder.makeTitleCell(myTable, MoneyWiseXReportBuilder.TEXT_PROFIT); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\tax\uk\MoneyWiseUKCapitalScheme.java | MoneyWise Personal Finance - Core | 46 |
| net\sourceforge\joceanus\moneywise\tax\uk\MoneyWiseUKRoomRentalScheme.java | MoneyWise Personal Finance - Core | 36 |
OceanusMoney myRemaining = adjustForAllowance(pConfig.getCapitalAllowance(), pAmount);
/* If we have any gains left */
if (myRemaining.isNonZero()) {
/* Adjust the basic allowance */
myRemaining = super.adjustAllowances(pConfig, myRemaining);
}
/* Return unallocated income */
return myRemaining;
}
@Override
protected OceanusMoney getAmountInAllowance(final MoneyWiseUKTaxConfig pConfig,
final OceanusMoney pAmount) {
/* Obtain the amount covered by the capital allowance */
OceanusMoney myAmount = getAmountInBand(pConfig.getCapitalAllowance(), pAmount);
/* If we have income left over */
if (myAmount.compareTo(pAmount) < 0) {
/* Calculate remaining amount */
final OceanusMoney myRemaining = new OceanusMoney(pAmount);
myRemaining.subtractAmount(myAmount);
/* Calculate the amount covered by basic allowance */
final OceanusMoney myXtra = super.getAmountInAllowance(pConfig, myRemaining);
/* Determine the total amount covered by the allowance */
myAmount = new OceanusMoney(myAmount);
myAmount.addAmount(myXtra);
}
/* return the amount */
return myAmount;
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\oceanus\decimal\OceanusDecimalParser.java | Oceanus Java Core Utilities | 122 |
| net\sourceforge\joceanus\oceanus\decimal\OceanusDecimalParser.java | Oceanus Java Core Utilities | 404 |
final OceanusDecimal pResult) {
/* Handle null value */
if (pValue == null) {
throw new IllegalArgumentException();
}
/* Create a working copy */
final StringBuilder myWork = new StringBuilder(pValue.trim());
/* If the value is negative, strip the leading minus sign */
final boolean isNegative = (myWork.length() > 0)
&& (myWork.charAt(0) == pLocale.getMinusSign());
if (isNegative) {
myWork.deleteCharAt(0);
}
/* Remove any grouping characters from the value */
final String myGrouping = pLocale.getGrouping();
int myPos;
for (;;) {
myPos = myWork.indexOf(myGrouping);
if (myPos == -1) {
break;
}
myWork.deleteCharAt(myPos);
}
/* Trim leading and trailing blanks again */
trimBuffer(myWork); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\controls\MoneyWiseXTaxBasisAnalysisSelect.java | MoneyWise Personal Finance - Core | 441 |
| net\sourceforge\joceanus\moneywise\lethe\ui\controls\MoneyWiseTaxBasisAnalysisSelect.java | MoneyWise Personal Finance - Core | 441 |
theFilter = new MoneyWiseXAnalysisTaxBasisFilter(theBasis);
theFilter.setDateRange(theDateRange);
} else {
theFilter = null;
}
}
}
/**
* Set the dateRange.
* @param pRange the dateRange
*/
private void setDateRange(final OceanusDateRange pRange) {
/* Store the dateRange */
theDateRange = pRange;
if (theFilter != null) {
theFilter.setDateRange(theDateRange);
}
}
/**
* Apply the State.
*/
private void applyState() {
/* Adjust the lock-down */
setEnabled(true);
theBasisButton.setValue(theBasis);
if (theAccount == null) {
theAccountButton.setValue(null, NLS_ALL);
} else {
theAccountButton.setValue(theAccount, theAccount.getSimpleName());
}
theAccountButton.setEnabled((theBasis != null) && theBasis.hasAccounts());
}
}
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\database\MoneyWiseTableCashCategory.java | MoneyWise Personal Finance - Core | 91 |
| net\sourceforge\joceanus\moneywise\database\MoneyWiseTableDepositCategory.java | MoneyWise Personal Finance - Core | 91 |
| net\sourceforge\joceanus\moneywise\database\MoneyWiseTableLoanCategory.java | MoneyWise Personal Finance - Core | 91 |
| net\sourceforge\joceanus\moneywise\database\MoneyWiseTableTransCategory.java | MoneyWise Personal Finance - Core | 91 |
if (MoneyWiseStaticDataType.CASHTYPE.equals(iField)) {
myTableDef.setIntegerValue(iField, pItem.getCategoryTypeId());
} else if (PrometheusDataResource.DATAGROUP_PARENT.equals(iField)) {
myTableDef.setIntegerValue(iField, pItem.getParentCategoryId());
} else if (PrometheusDataResource.DATAITEM_FIELD_NAME.equals(iField)) {
myTableDef.setBinaryValue(iField, pItem.getNameBytes());
} else if (PrometheusDataResource.DATAITEM_FIELD_DESC.equals(iField)) {
myTableDef.setBinaryValue(iField, pItem.getDescBytes());
} else {
super.setFieldValue(pItem, iField);
}
}
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\quicken\file\MoneyWiseQIFLine.java | MoneyWise Personal Finance - Core | 1005 |
| net\sourceforge\joceanus\moneywise\quicken\file\MoneyWiseQIFLine.java | MoneyWise Personal Finance - Core | 1438 |
if (!getLineType().equals(myLine.getLineType())) {
return false;
}
/* Check account */
if (!theAccount.equals(myLine.getAccount())) {
return false;
}
/* Check classes */
final List<MoneyWiseQIFClass> myClasses = myLine.getClassList();
if (theClasses == null) {
return myClasses == null;
} else if (myClasses == null) {
return true;
}
return theClasses.equals(myClasses);
}
@Override
public int hashCode() {
int myResult = MoneyWiseQIFFile.HASH_BASE * getLineType().hashCode();
if (theClasses != null) {
myResult += theClasses.hashCode();
myResult *= MoneyWiseQIFFile.HASH_BASE;
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\ui\dialog\MoneyWiseDepositDialog.java | MoneyWise Personal Finance - Core | 123 |
| net\sourceforge\joceanus\moneywise\ui\dialog\MoneyWiseLoanDialog.java | MoneyWise Personal Finance - Core | 97 |
});
}
/**
* Build Main subPanel.
* @param pFactory the GUI factory
*/
private void buildMainPanel(final TethysUIFactory<?> pFactory) {
/* Create the text fields */
final TethysUIFieldFactory myFields = pFactory.fieldFactory();
final TethysUIStringEditField myName = myFields.newStringField();
final TethysUIStringEditField myDesc = myFields.newStringField();
/* Create the buttons */
final TethysUIScrollButtonField<MoneyWiseAssetCategory> myCategoryButton = myFields.newScrollField(MoneyWiseAssetCategory.class);
final TethysUIScrollButtonField<MoneyWisePayee> myParentButton = myFields.newScrollField(MoneyWisePayee.class);
final TethysUIScrollButtonField<MoneyWiseCurrency> myCurrencyButton = myFields.newScrollField(MoneyWiseCurrency.class);
final TethysUIIconButtonField<Boolean> myClosedButton = myFields.newIconField(Boolean.class);
/* Assign the fields to the panel */
theFieldSet.addField(PrometheusDataResource.DATAITEM_FIELD_NAME, myName, MoneyWiseDeposit::getName); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\ui\dialog\MoneyWiseLoanDialog.java | MoneyWise Personal Finance - Core | 127 |
| net\sourceforge\joceanus\moneywise\ui\dialog\MoneyWisePayeeDialog.java | MoneyWise Personal Finance - Core | 116 |
myCurrencyButton.setMenuConfigurator(c -> buildCurrencyMenu(c, getItem()));
final Map<Boolean, TethysUIIconMapSet<Boolean>> myMapSets = MoneyWiseIcon.configureLockedIconButton(pFactory);
myClosedButton.setIconMapSet(() -> myMapSets.get(theClosedState));
/* Configure validation checks */
myName.setValidator(this::isValidName);
myDesc.setValidator(this::isValidDesc);
}
/**
* Build account subPanel.
* @param pFactory the GUI factory
*/
private void buildAccountPanel(final TethysUIFactory<?> pFactory) {
/* Create a new panel */
theFieldSet.newPanel(TAB_ACCOUNT);
/* Allocate fields */
final TethysUIFieldFactory myFields = pFactory.fieldFactory();
final TethysUICharArrayEditField mySortCode = myFields.newCharArrayField();
final TethysUICharArrayEditField myAccount = myFields.newCharArrayField();
final TethysUICharArrayEditField myReference = myFields.newCharArrayField(); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\ui\dialog\MoneyWisePortfolioDialog.java | MoneyWise Personal Finance - Core | 95 |
| net\sourceforge\joceanus\moneywise\ui\dialog\MoneyWiseSecurityDialog.java | MoneyWise Personal Finance - Core | 122 |
buildNotesPanel(pFactory);
}
/**
* Build Main subPanel.
* @param pFactory the GUI factory
*/
private void buildMainPanel(final TethysUIFactory<?> pFactory) {
/* Create the text fields */
final TethysUIFieldFactory myFields = pFactory.fieldFactory();
final TethysUIStringEditField myName = myFields.newStringField();
final TethysUIStringEditField myDesc = myFields.newStringField();
/* Create the buttons */
final TethysUIScrollButtonField<MoneyWiseAssetCategory> myTypeButton = myFields.newScrollField(MoneyWiseAssetCategory.class);
final TethysUIScrollButtonField<MoneyWisePayee> myParentButton = myFields.newScrollField(MoneyWisePayee.class);
final TethysUIScrollButtonField<MoneyWiseCurrency> myCurrencyButton = myFields.newScrollField(MoneyWiseCurrency.class);
final TethysUIIconButtonField<Boolean> myClosedButton = myFields.newIconField(Boolean.class);
/* Assign the fields to the panel */
theFieldSet.addField(PrometheusDataResource.DATAITEM_FIELD_NAME, myName, MoneyWisePortfolio::getName); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\tethys\javafx\chart\TethysUIFXAreaChart.java | Tethys JavaFX Utilities | 116 |
| net\sourceforge\joceanus\tethys\javafx\chart\TethysUIFXBarChart.java | Tethys JavaFX Utilities | 79 |
theChart.setVerticalGridLinesVisible(false);
/* Create the map */
theSeries = new HashMap<>();
/* Create Node */
theNode = new TethysUIFXNode(theChart);
}
@Override
public TethysUIFXNode getNode() {
return theNode;
}
@Override
public void setVisible(final boolean pVisible) {
theNode.setManaged(pVisible);
theNode.setVisible(pVisible);
}
@Override
public void setEnabled(final boolean pEnabled) {
theChart.setDisable(!pEnabled);
}
@Override
public void setPreferredWidth(final Integer pWidth) {
theChart.setPrefWidth(pWidth);
}
@Override
public void setPreferredHeight(final Integer pHeight) {
theChart.setPrefHeight(pHeight);
}
@Override
public void updateAreaChart(final TethysUIAreaChartData pData) { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\jca\JcaAgreement.java | GordianKnot Security Framework | 320 |
| net\sourceforge\joceanus\gordianknot\impl\jca\JcaAgreement.java | GordianKnot Security Framework | 434 |
| net\sourceforge\joceanus\gordianknot\impl\jca\JcaAgreement.java | GordianKnot Security Framework | 539 |
theAgreement.doPhase(myPublic.getPublicKey(), true);
storeSecret(theAgreement.generateSecret());
} catch (InvalidKeyException
| InvalidAlgorithmParameterException e) {
throw new GordianCryptoException(ERR_AGREEMENT, e);
}
}
/**
* Establish the agreement.
* @param pKeyPair the keyPair
* @throws GordianException on error
*/
private void establishAgreement(final GordianKeyPair pKeyPair) throws GordianException {
if (getAgreementSpec().getKeyPairSpec().getKeyPairType().equals(GordianKeyPairType.XDH)) {
final String myBase = pKeyPair.getKeyPairSpec().toString();
final String myName = JcaAgreementFactory.getFullAgreementName(myBase, getAgreementSpec());
theAgreement = JcaAgreementFactory.getJavaKeyAgreement(myName, false);
}
}
}
/**
* Jca Basic Agreement.
*/
public static class JcaBasicAgreement | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\reports\MoneyWiseXReportNetWorth.java | MoneyWise Personal Finance - Core | 313 |
| net\sourceforge\joceanus\moneywise\atlas\reports\MoneyWiseXReportNetWorth.java | MoneyWise Personal Finance - Core | 403 |
final MoneyWiseDepositCategory myCurr = myBucket.getAccountCategory();
if (!myBucket.isActive()
|| !MetisDataDifference.isEqual(myCurr.getParentCategory(), myCategory)) {
continue;
}
/* Access bucket name */
final String myName = myBucket.getName();
/* Access values */
final MoneyWiseXAnalysisAccountValues myValues = myBucket.getValues();
/* Create the SubCategory row */
theBuilder.startRow(myTable);
theBuilder.makeDelayLinkCell(myTable, myName, myCurr.getSubCategory());
theBuilder.makeTotalCell(myTable, myValues.getMoneyValue(MoneyWiseXAnalysisAccountAttr.VALUATION));
/* Note the delayed subTable */
setDelayedTable(myName, myTable, myBucket);
}
/* Embed the table correctly */
theBuilder.embedTable(myTable, pCategory.getName());
}
/**
* Build a category report.
* @param pParent the table parent
* @param pCategory the category bucket
*/
private void makeCategoryReport(final MetisHTMLTable pParent, | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\lethe\reports\MoneyWiseReportNetWorth.java | MoneyWise Personal Finance - Core | 313 |
| net\sourceforge\joceanus\moneywise\lethe\reports\MoneyWiseReportNetWorth.java | MoneyWise Personal Finance - Core | 403 |
final MoneyWiseDepositCategory myCurr = myBucket.getAccountCategory();
if (!myBucket.isActive()
|| !MetisDataDifference.isEqual(myCurr.getParentCategory(), myCategory)) {
continue;
}
/* Access bucket name */
final String myName = myBucket.getName();
/* Access values */
final MoneyWiseAnalysisAccountValues myValues = myBucket.getValues();
/* Create the SubCategory row */
theBuilder.startRow(myTable);
theBuilder.makeDelayLinkCell(myTable, myName, myCurr.getSubCategory());
theBuilder.makeTotalCell(myTable, myValues.getMoneyValue(MoneyWiseAnalysisAccountAttr.VALUATION));
/* Note the delayed subTable */
setDelayedTable(myName, myTable, myBucket);
}
/* Embed the table correctly */
theBuilder.embedTable(myTable, pCategory.getName());
}
/**
* Build a category report.
* @param pParent the table parent
* @param pCategory the category bucket
*/
private void makeCategoryReport(final MetisHTMLTable pParent, | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\ui\base\MoneyWiseCategoryTable.java | MoneyWise Personal Finance - Core | 145 |
| net\sourceforge\joceanus\moneywise\ui\panel\MoneyWiseStaticTable.java | MoneyWise Personal Finance - Core | 144 |
.setOnCommit((r, v) -> updateField(MoneyWiseCategoryBase::setDescription, r, v));
/* Create the Active column */
final TethysUIIconMapSet<MetisAction> myActionMapSet = MetisIcon.configureStatusIconButton(myGuiFactory);
myTable.declareIconColumn(PrometheusDataResource.DATAITEM_TOUCH, MetisAction.class)
.setIconMapSet(r -> myActionMapSet)
.setCellValueFactory(r -> r.isActive() ? MetisAction.ACTIVE : MetisAction.DELETE)
.setName(MoneyWiseUIResource.STATICDATA_ACTIVE.getValue())
.setEditable(true)
.setCellEditable(r -> !r.isActive())
.setColumnWidth(WIDTH_ICON)
.setOnCommit((r, v) -> updateField(this::deleteRow, r, v)); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\ui\panel\MoneyWiseCashCategoryTable.java | MoneyWise Personal Finance - Core | 152 |
| net\sourceforge\joceanus\moneywise\ui\panel\MoneyWiseDepositCategoryTable.java | MoneyWise Personal Finance - Core | 152 |
| net\sourceforge\joceanus\moneywise\ui\panel\MoneyWiseLoanCategoryTable.java | MoneyWise Personal Finance - Core | 152 |
| net\sourceforge\joceanus\moneywise\ui\panel\MoneyWiseTransCategoryTable.java | MoneyWise Personal Finance - Core | 152 |
MoneyWiseCashCategory myParent = pCategory.getParentCategory();
if (!MetisDataDifference.isEqual(getParent(), myParent)) {
if (myParent != null) {
myParent = theCategories.findItemById(myParent.getIndexedId());
}
selectParent(myParent);
}
/* Select the row and ensure that it is visible */
getTable().selectRow(pCategory);
}
}
@Override
protected void handleRewind() {
/* Only action if we are not editing */
if (!theActiveCategory.isEditing()) {
/* Handle the reWind */
setEnabled(true);
super.handleRewind();
}
/* Adjust for changes */
notifyChanges();
}
/**
* Handle panel state.
*/
private void handlePanelState() {
/* Only action if we are not editing */
if (!theActiveCategory.isEditing()) {
/* handle the edit transition */
setEnabled(true);
final MoneyWiseCashCategory myCategory = theActiveCategory.getSelectedItem(); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianBlake2XEngine.java | GordianKnot Security Framework | 70 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSkeinXofEngine.java | GordianKnot Security Framework | 71 |
theKeyStream = new byte[theBlake2X.getByteLength() >> 1];
reset(pSource);
}
/**
* initialise a Blake2X cipher.
* @param forEncryption whether or not we are for encryption.
* @param params the parameters required to set up the cipher.
* @exception IllegalArgumentException if the params argument is inappropriate.
*/
public void init(final boolean forEncryption,
final CipherParameters params) {
/*
* Blake2X encryption and decryption is completely symmetrical, so the 'forEncryption' is
* irrelevant. (Like 90% of stream ciphers)
*/
/* Determine parameters */
CipherParameters myParams = params;
byte[] newKey = null;
byte[] newIV = null;
if ((myParams instanceof ParametersWithIV)) {
final ParametersWithIV ivParams = (ParametersWithIV) myParams;
newIV = ivParams.getIV();
myParams = ivParams.getParameters();
}
if (myParams instanceof KeyParameter) {
final KeyParameter keyParam = (KeyParameter) myParams;
newKey = keyParam.getKey();
}
if (newKey == null || newIV == null) {
throw new IllegalArgumentException("A key and IV must be provided");
}
/* Initialise engine and mark as initialised */
final GordianBlake2ParametersBuilder myBuilder = new GordianBlake2ParametersBuilder() | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSosemanukEngine.java | GordianKnot Security Framework | 603 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSosemanukEngine.java | GordianKnot Security Framework | 1155 |
tt = w3 ^ w6 ^ w0 ^ w2 ^ (0x9E3779B9 ^ (32 + 3));
w3 = rotateLeft(tt, 11);
r0 = w0;
r1 = w1;
r2 = w2;
r3 = w3;
r4 = r0;
r0 |= r3;
r3 ^= r1;
r1 &= r4;
r4 ^= r2;
r2 ^= r3;
r3 &= r0;
r4 |= r1;
r3 ^= r4;
r0 ^= r1;
r4 &= r0;
r1 ^= r3;
r4 ^= r2;
r1 |= r0;
r1 ^= r2;
r0 ^= r3;
r2 = r1;
r1 |= r3;
r1 ^= r0;
serpent24SubKeys[i++] = r1;
serpent24SubKeys[i++] = r2;
serpent24SubKeys[i++] = r3;
serpent24SubKeys[i++] = r4; | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\controls\MoneyWiseXPayeeAnalysisSelect.java | MoneyWise Personal Finance - Core | 132 |
| net\sourceforge\joceanus\moneywise\lethe\ui\controls\MoneyWisePayeeAnalysisSelect.java | MoneyWise Personal Finance - Core | 132 |
public MoneyWiseXAnalysisPayeeFilter getFilter() {
return theState.getFilter();
}
@Override
public boolean isAvailable() {
return thePayees != null
&& !thePayees.isEmpty();
}
/**
* Create SavePoint.
*/
public void createSavePoint() {
/* Create the savePoint */
theSavePoint = new MoneyWisePayeeState(theState);
}
/**
* Restore SavePoint.
*/
public void restoreSavePoint() {
/* Restore the savePoint */
theState = new MoneyWisePayeeState(theSavePoint);
/* Apply the state */
theState.applyState();
}
@Override
public void setEnabled(final boolean bEnabled) {
/* Pass call on to button */
theButton.setEnabled(bEnabled && isAvailable());
}
@Override
public void setVisible(final boolean pVisible) {
thePanel.setVisible(pVisible);
}
/**
* Set analysis.
* @param pAnalysis the analysis.
*/
public void setAnalysis(final MoneyWiseXAnalysis pAnalysis) { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\controls\MoneyWiseXTaxBasisAnalysisSelect.java | MoneyWise Personal Finance - Core | 167 |
| net\sourceforge\joceanus\moneywise\lethe\ui\controls\MoneyWiseTaxBasisAnalysisSelect.java | MoneyWise Personal Finance - Core | 167 |
public MoneyWiseXAnalysisTaxBasisFilter getFilter() {
return theState.getFilter();
}
@Override
public boolean isAvailable() {
return theTaxBases != null
&& !theTaxBases.isEmpty();
}
/**
* Create SavePoint.
*/
public void createSavePoint() {
/* Create the savePoint */
theSavePoint = new MoneyWiseTaxBasisState(theState);
}
/**
* Restore SavePoint.
*/
public void restoreSavePoint() {
/* Restore the savePoint */
theState = new MoneyWiseTaxBasisState(theSavePoint);
/* Apply the state */
theState.applyState();
}
@Override
public void setEnabled(final boolean bEnabled) {
/* Pass call on to basis button */
theBasisButton.setEnabled(bEnabled && isAvailable());
}
@Override
public void setVisible(final boolean pVisible) {
thePanel.setVisible(pVisible);
}
/**
* Set analysis.
* @param pAnalysis the analysis.
*/
public void setAnalysis(final MoneyWiseXAnalysis pAnalysis) { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\controls\MoneyWiseXTransCategoryAnalysisSelect.java | MoneyWise Personal Finance - Core | 137 |
| net\sourceforge\joceanus\moneywise\lethe\ui\controls\MoneyWiseTransCategoryAnalysisSelect.java | MoneyWise Personal Finance - Core | 137 |
public MoneyWiseXAnalysisTransCategoryFilter getFilter() {
return theState.getFilter();
}
@Override
public boolean isAvailable() {
return theCategories != null
&& !theCategories.isEmpty();
}
/**
* Create SavePoint.
*/
public void createSavePoint() {
/* Create the savePoint */
theSavePoint = new MoneyWiseEventState(theState);
}
/**
* Restore SavePoint.
*/
public void restoreSavePoint() {
/* Restore the savePoint */
theState = new MoneyWiseEventState(theSavePoint);
/* Apply the state */
theState.applyState();
}
@Override
public void setEnabled(final boolean bEnabled) {
/* Pass call on to button */
theButton.setEnabled(bEnabled && isAvailable());
}
@Override
public void setVisible(final boolean pVisible) {
thePanel.setVisible(pVisible);
}
/**
* Set analysis.
* @param pAnalysis the analysis.
*/
public void setAnalysis(final MoneyWiseXAnalysis pAnalysis) { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\panel\MoneyWiseXEventTable.java | MoneyWise Personal Finance - Core | 821 |
| net\sourceforge\joceanus\moneywise\lethe\ui\panel\MoneyWiseTransactionTable.java | MoneyWise Personal Finance - Core | 826 |
theActiveTran.buildReturnedAccountMenu(pMenu, pEvent);
}
/**
* New item.
*/
private void addNewItem() {
/* Make sure that we have finished editing */
cancelEditing();
/* Create a new profile */
final OceanusProfile myTask = getView().getNewProfile("addNewItem");
/* Create the new transaction */
myTask.startTask("buildItem");
final MoneyWiseValidateTransaction myBuilder = (MoneyWiseValidateTransaction) theTransactions.getValidator();
final MoneyWiseTransaction myTrans = theFilter.buildNewTransaction(myBuilder);
/* If we have one available */
if (myTrans != null) {
/* Add the new item */
myTask.startTask("addToList");
theTransactions.add(myTrans);
myTrans.setNewVersion();
/* Validate the new item and notify of the changes */
myTask.startTask("incrementVersion");
getEditSet().incrementVersion();
/* validate the item */
myTask.startTask("validate");
myTrans.validate();
/* Lock the table */
myTask.startTask("setItem");
theActiveTran.setNewItem(theAnalysisMgr.getAnalysis().getEvents().newTransaction(myTrans)); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseLoanInfoSet.java | MoneyWise Personal Finance - Core | 171 |
| net\sourceforge\joceanus\moneywise\data\validate\MoneyWiseValidateLoanInfoSet.java | MoneyWise Personal Finance - Core | 45 |
: isClassRequired(myClass);
}
@Override
public MetisFieldRequired isClassRequired(final PrometheusDataInfoClass pClass) {
/* Access details about the Loan */
final MoneyWiseLoan myLoan = getOwner();
final MoneyWiseLoanCategory myCategory = myLoan.getCategory();
/* If we have no Category, no class is allowed */
if (myCategory == null) {
return MetisFieldRequired.NOTALLOWED;
}
/* Switch on class */
switch ((MoneyWiseAccountInfoClass) pClass) {
/* Allowed set */
case NOTES:
case SORTCODE:
case ACCOUNT:
case REFERENCE:
case OPENINGBALANCE:
return MetisFieldRequired.CANEXIST;
/* Not allowd */
case WEBSITE:
case CUSTOMERNO:
case USERID:
case PASSWORD:
case MATURITY:
case AUTOEXPENSE:
case AUTOPAYEE:
case SYMBOL:
case REGION:
case UNDERLYINGSTOCK:
case OPTIONPRICE:
default:
return MetisFieldRequired.NOTALLOWED;
}
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\sheets\MoneyWiseSheetAccountInfoType.java | MoneyWise Personal Finance - Core | 95 |
| net\sourceforge\joceanus\moneywise\sheets\MoneyWiseSheetTransInfoType.java | MoneyWise Personal Finance - Core | 95 |
pReport.setNewStage(AREA_ACCOUNTINFOTYPES);
/* Count the number of InfoTypes */
final int myTotal = myView.getRowCount();
/* Declare the number of steps */
pReport.setNumSteps(myTotal);
/* Loop through the rows of the single column range */
for (int i = 0; i < myTotal; i++) {
/* Access the cell by reference */
final PrometheusSheetRow myRow = myView.getRowByIndex(i);
final PrometheusSheetCell myCell = myView.getRowCellByIndex(myRow, 0);
/* Add the value into the tables */
myList.addBasicItem(myCell.getString());
/* Report the progress */
pReport.setNextStep();
}
/* PostProcess the list */
myList.postProcessOnLoad();
/* Handle Exceptions */
} catch (TethysUIThreadCancelException e) {
throw e;
} catch (OceanusException e) {
throw new MoneyWiseIOException("Failed to load " + myList.getItemType().getListName(), e);
}
}
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\sheets\MoneyWiseSheetCashCategoryType.java | MoneyWise Personal Finance - Core | 95 |
| net\sourceforge\joceanus\moneywise\sheets\MoneyWiseSheetDepositCategoryType.java | MoneyWise Personal Finance - Core | 95 |
| net\sourceforge\joceanus\moneywise\sheets\MoneyWiseSheetLoanCategoryType.java | MoneyWise Personal Finance - Core | 95 |
| net\sourceforge\joceanus\moneywise\sheets\MoneyWiseSheetPayeeType.java | MoneyWise Personal Finance - Core | 95 |
| net\sourceforge\joceanus\moneywise\sheets\MoneyWiseSheetPortfolioType.java | MoneyWise Personal Finance - Core | 95 |
| net\sourceforge\joceanus\moneywise\sheets\MoneyWiseSheetSecurityType.java | MoneyWise Personal Finance - Core | 95 |
| net\sourceforge\joceanus\moneywise\sheets\MoneyWiseSheetTaxBasis.java | MoneyWise Personal Finance - Core | 95 |
| net\sourceforge\joceanus\moneywise\sheets\MoneyWiseSheetTransCategoryType.java | MoneyWise Personal Finance - Core | 96 |
pReport.setNewStage(AREA_CASHCATTYPES);
/* Count the number of AccountCategoryTypes */
final int myTotal = myView.getRowCount();
/* Declare the number of steps */
pReport.setNumSteps(myTotal);
/* Loop through the rows of the single column range */
for (int i = 0; i < myTotal; i++) {
/* Access the cell by reference */
final PrometheusSheetRow myRow = myView.getRowByIndex(i);
final PrometheusSheetCell myCell = myView.getRowCellByIndex(myRow, 0);
/* Add the value into the tables */
myList.addBasicItem(myCell.getString());
/* Report the progress */
pReport.setNextStep();
}
/* PostProcess the list */
myList.postProcessOnLoad();
/* Handle exceptions */
} catch (TethysUIThreadCancelException e) {
throw e;
} catch (OceanusException e) {
throw new MoneyWiseIOException("Failed to Load " + myList.getItemType().getListName(), e);
}
}
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\tethys\javafx\button\TethysUIFXListButtonManager.java | Tethys JavaFX Utilities | 71 |
| net\sourceforge\joceanus\tethys\swing\button\TethysUISwingListButtonManager.java | Tethys Java Swing Utilities | 68 |
getMenu().showMenuAtPosition(getNode().getNode(), Side.BOTTOM);
}
@Override
public void setPreferredWidth(final Integer pWidth) {
getNode().setPreferredWidth(pWidth);
}
@Override
public void setPreferredHeight(final Integer pHeight) {
getNode().setPreferredHeight(pHeight);
}
@Override
public void setBorderPadding(final Integer pPadding) {
super.setBorderPadding(pPadding);
getNode().createWrapperPane(getBorderTitle(), getBorderPadding());
}
@Override
public void setBorderTitle(final String pTitle) {
super.setBorderTitle(pTitle);
getNode().createWrapperPane(getBorderTitle(), getBorderPadding());
}
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\themis\analysis\ThemisAnalysisClass.java | Themis Core Project Framework | 121 |
| net\sourceforge\joceanus\themis\analysis\ThemisAnalysisInterface.java | Themis Core Project Framework | 137 |
}
@Override
public String getShortName() {
return theShortName;
}
@Override
public String getFullName() {
return theFullName;
}
@Override
public ThemisAnalysisDataMap getDataMap() {
return theDataMap;
}
@Override
public ThemisAnalysisProperties getProperties() {
return theProperties;
}
@Override
public Deque<ThemisAnalysisElement> getContents() {
return theContents;
}
@Override
public ThemisAnalysisContainer getParent() {
return this;
}
@Override
public List<ThemisAnalysisReference> getAncestors() {
return theAncestors;
}
@Override
public int getNumLines() {
return theNumLines;
}
@Override
public String toString() {
return getShortName();
}
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseCategoryBase.java | MoneyWise Personal Finance - Core | 82 |
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseRegion.java | MoneyWise Personal Finance - Core | 85 |
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseTransTag.java | MoneyWise Personal Finance - Core | 85 |
protected MoneyWiseCategoryBase(final MoneyWiseCategoryBaseList<?> pList,
final PrometheusDataValues pValues) throws OceanusException {
/* Initialise the item */
super(pList, pValues);
/* Protect against exceptions */
try {
/* Store the Name */
Object myValue = pValues.getValue(PrometheusDataResource.DATAITEM_FIELD_NAME);
if (myValue instanceof String) {
setValueName((String) myValue);
} else if (myValue instanceof byte[]) {
setValueName((byte[]) myValue);
}
/* Store the Description */
myValue = pValues.getValue(PrometheusDataResource.DATAITEM_FIELD_DESC);
if (myValue instanceof String) {
setValueDesc((String) myValue);
} else if (myValue instanceof byte[]) {
setValueDesc((byte[]) myValue);
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseTransInfoSet.java | MoneyWise Personal Finance - Core | 839 |
| net\sourceforge\joceanus\moneywise\data\validate\MoneyWiseValidateTransInfoSet.java | MoneyWise Personal Finance - Core | 589 |
getOwner().addError(MoneyWiseTransBase.ERROR_CURRENCY, getFieldForClass(pInfo.getInfoClass()));
}
}
/**
* Validate the deltaUnits.
* @param pInfo the info
*/
private void validateDeltaUnits(final MoneyWiseTransInfo pInfo) {
final MoneyWiseTransaction myTrans = getOwner();
final MoneyWiseAssetDirection myDir = myTrans.getDirection();
final MoneyWiseTransCategoryClass myCatClass = myTrans.getCategoryClass();
final MoneyWiseTransInfoClass myInfoClass = pInfo.getInfoClass();
final MetisFieldRequired isRequired = myInfoClass == MoneyWiseTransInfoClass.ACCOUNTDELTAUNITS
? isAccountUnitsPositive(myDir, myCatClass)
: isPartnerUnitsPositive(myDir, myCatClass);
final OceanusUnits myUnits = pInfo.getValue(OceanusUnits.class);
if (myUnits.isZero()) {
getOwner().addError(PrometheusDataItem.ERROR_ZERO, getFieldForClass(myInfoClass)); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\tethys\javafx\button\TethysUIFXDateButtonManager.java | Tethys JavaFX Utilities | 89 |
| net\sourceforge\joceanus\tethys\swing\button\TethysUISwingScrollButtonManager.java | Tethys Java Swing Utilities | 78 |
theDialog.showDialogUnderNode(getNode().getNode());
}
@Override
public void setPreferredWidth(final Integer pWidth) {
getNode().setPreferredWidth(pWidth);
}
@Override
public void setPreferredHeight(final Integer pHeight) {
getNode().setPreferredHeight(pHeight);
}
@Override
public void setBorderPadding(final Integer pPadding) {
super.setBorderPadding(pPadding);
getNode().createWrapperPane(getBorderTitle(), getBorderPadding());
}
@Override
public void setBorderTitle(final String pTitle) {
super.setBorderTitle(pTitle);
getNode().createWrapperPane(getBorderTitle(), getBorderPadding());
}
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\quicken\file\MoneyWiseQIFPortfolioBuilder.java | MoneyWise Personal Finance - Core | 204 |
| net\sourceforge\joceanus\moneywise\quicken\file\MoneyWiseQIFPortfolioBuilder.java | MoneyWise Personal Finance - Core | 278 |
protected void processIncomeToSecurity(final MoneyWisePayee pPayee,
final MoneyWiseSecurityHolding pHolding,
final MoneyWiseTransaction pTrans) {
/* Access Portfolio Account */
final MoneyWisePortfolio myPort = pHolding.getPortfolio();
final MoneyWiseSecurity mySecurity = pHolding.getSecurity();
final MoneyWiseQIFAccountEvents myPortfolio = theFile.registerAccount(myPort);
/* Determine style */
final boolean useHoldingAccount = theFileType.useInvestmentHolding4Category();
/* Access Transaction details */
final MoneyWiseQIFPayee myQPayee = theFile.registerPayee(pPayee);
final MoneyWiseQIFSecurity myQSecurity = theFile.registerSecurity(mySecurity);
final MoneyWiseQIFEventCategory myQCategory = theFile.registerCategory(pTrans.getCategory());
/* Obtain classes */
final List<MoneyWiseQIFClass> myList = theBuilder.getTransactionClasses(pTrans);
/* Access details */
final OceanusMoney myAmount = pTrans.getAmount(); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\prometheus\database\PrometheusDataStore.java | Prometheus Core Application Framework | 117 |
| net\sourceforge\joceanus\prometheus\database\PrometheusDataStore.java | Prometheus Core Application Framework | 172 |
final String myConnString = theDriver.getConnectionString(pDatabase, pConfig.getServer(), pConfig.getPort());
/* Create the properties and record user */
final Properties myProperties = new Properties();
final String myUser = pConfig.getUser();
final char[] myPass = pConfig.getPassword();
myProperties.setProperty(PROPERTY_USER, myUser);
myProperties.setProperty(PROPERTY_PASS, new String(myPass));
/* If we are using instance */
if (theDriver.useInstance()) {
final String myInstance = pConfig.getInstance();
myProperties.setProperty(PROPERTY_INSTANCE, myInstance);
myProperties.setProperty(PROPERTY_ENCRYPT, "false");
}
/* Connect using properties */
theConn = DriverManager.getConnection(myConnString, myProperties);
/* Connect to the correct database */
theConn.setCatalog(pDatabase); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\tethys\javafx\button\TethysUIFXDateButtonManager.java | Tethys JavaFX Utilities | 89 |
| net\sourceforge\joceanus\tethys\javafx\button\TethysUIFXIconButtonManager.java | Tethys JavaFX Utilities | 50 |
| net\sourceforge\joceanus\tethys\javafx\button\TethysUIFXListButtonManager.java | Tethys JavaFX Utilities | 71 |
| net\sourceforge\joceanus\tethys\javafx\button\TethysUIFXScrollButtonManager.java | Tethys JavaFX Utilities | 82 |
| net\sourceforge\joceanus\tethys\swing\button\TethysUISwingIconButtonManager.java | Tethys Java Swing Utilities | 47 |
| net\sourceforge\joceanus\tethys\swing\button\TethysUISwingListButtonManager.java | Tethys Java Swing Utilities | 68 |
| net\sourceforge\joceanus\tethys\swing\button\TethysUISwingScrollButtonManager.java | Tethys Java Swing Utilities | 78 |
theDialog.showDialogUnderNode(getNode().getNode());
}
@Override
public void setPreferredWidth(final Integer pWidth) {
getNode().setPreferredWidth(pWidth);
}
@Override
public void setPreferredHeight(final Integer pHeight) {
getNode().setPreferredHeight(pHeight);
}
@Override
public void setBorderPadding(final Integer pPadding) {
super.setBorderPadding(pPadding);
getNode().createWrapperPane(getBorderTitle(), getBorderPadding());
}
@Override
public void setBorderTitle(final String pTitle) {
super.setBorderTitle(pTitle);
getNode().createWrapperPane(getBorderTitle(), getBorderPadding());
}
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\bc\BouncyDSTUKeyPair.java | GordianKnot Security Framework | 198 |
| net\sourceforge\joceanus\gordianknot\impl\bc\BouncyGOSTKeyPair.java | GordianKnot Security Framework | 203 |
final BCDSTU4145PublicKey pubKey = new BCDSTU4145PublicKey(ALGO, myParms, theSpec);
return new X509EncodedKeySpec(pubKey.getEncoded());
}
@Override
public BouncyKeyPair derivePublicOnlyKeyPair(final X509EncodedKeySpec pEncodedKey) throws GordianException {
final BouncyECPublicKey myPublic = derivePublicKey(pEncodedKey);
return new BouncyKeyPair(myPublic);
}
/**
* Derive public key from encoded.
* @param pEncodedKey the encoded key
* @return the public key
* @throws GordianException on error
*/
private BouncyECPublicKey derivePublicKey(final X509EncodedKeySpec pEncodedKey) throws GordianException {
/* Check the keySpecs */
checkKeySpec(pEncodedKey);
/* derive publicKey */
final SubjectPublicKeyInfo myInfo = SubjectPublicKeyInfo.getInstance(pEncodedKey.getEncoded());
final ECPublicKeyParameters myParms = deriveFromPubKeyInfo(myInfo);
return new BouncyECPublicKey(getKeySpec(), myParms);
}
/**
* Derive Public Key parameters from SubjectPublicKeyInfo. (extracted from BouncyCastle initialiser)
* @param pKeyInfo the keyInfo
* @return the PrivateKeyParameters
* @throws GordianException on error
*/
private ECPublicKeyParameters deriveFromPubKeyInfo(final SubjectPublicKeyInfo pKeyInfo) throws GordianException {
final ASN1BitString bits = pKeyInfo.getPublicKeyData(); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\reports\MoneyWiseXReportAssetGains.java | MoneyWise Personal Finance - Core | 105 |
| net\sourceforge\joceanus\moneywise\atlas\reports\MoneyWiseXReportPortfolioView.java | MoneyWise Personal Finance - Core | 126 |
theBuilder.makeTitleCell(myTable, TEXT_GAINS);
/* Loop through the Portfolio Buckets */
final Iterator<MoneyWiseXAnalysisPortfolioBucket> myIterator = myPortfolios.iterator();
while (myIterator.hasNext()) {
final MoneyWiseXAnalysisPortfolioBucket myBucket = myIterator.next();
/* Access bucket name */
final String myName = myBucket.getName();
/* Access values */
final MoneyWiseXAnalysisSecurityValues myValues = myBucket.getValues();
/* Format the Asset */
theBuilder.startRow(myTable);
theBuilder.makeDelayLinkCell(myTable, myName);
/* Handle values bucket value */
theBuilder.makeValueCell(myTable, myBucket.getNonCashValue(false));
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseXAnalysisSecurityAttr.RESIDUALCOST));
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseXAnalysisSecurityAttr.REALISEDGAINS)); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\controls\MoneyWiseXCashAnalysisSelect.java | MoneyWise Personal Finance - Core | 492 |
| net\sourceforge\joceanus\moneywise\lethe\ui\controls\MoneyWiseCashAnalysisSelect.java | MoneyWise Personal Finance - Core | 492 |
theFilter = new MoneyWiseXAnalysisCashFilter(theCash);
theFilter.setDateRange(theDateRange);
} else {
theFilter = null;
}
}
/**
* Set new Category.
* @param pCategory the Category
* @return true/false did a change occur
*/
private boolean setCategory(final MoneyWiseCashCategory pCategory) {
/* Adjust the selected category */
if (!MetisDataDifference.isEqual(pCategory, theCategory)) {
setTheCash(pCategory, getDefaultCash(pCategory));
return true;
}
return false;
}
/**
* Set the dateRange.
* @param pRange the dateRange
*/
private void setDateRange(final OceanusDateRange pRange) {
/* Store the dateRange */
theDateRange = pRange;
if (theFilter != null) {
theFilter.setDateRange(theDateRange);
}
}
/**
* Apply the State.
*/
private void applyState() {
/* Adjust the lock-down */
setEnabled(true);
theCashButton.setValue(theCash);
theCatButton.setValue(theCategory);
}
}
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\controls\MoneyWiseXDepositAnalysisSelect.java | MoneyWise Personal Finance - Core | 487 |
| net\sourceforge\joceanus\moneywise\lethe\ui\controls\MoneyWiseDepositAnalysisSelect.java | MoneyWise Personal Finance - Core | 487 |
theFilter = new MoneyWiseXAnalysisDepositFilter(theDeposit);
theFilter.setDateRange(theDateRange);
} else {
theFilter = null;
}
}
/**
* Set new Category.
* @param pCategory the Category
* @return true/false did a change occur
*/
private boolean setCategory(final MoneyWiseDepositCategory pCategory) {
/* Adjust the selected category */
if (!MetisDataDifference.isEqual(pCategory, theCategory)) {
setTheDeposit(pCategory, getDefaultDeposit(pCategory));
return true;
}
return false;
}
/**
* Set the dateRange.
* @param pRange the dateRange
*/
private void setDateRange(final OceanusDateRange pRange) {
/* Store the dateRange */
theDateRange = pRange;
if (theFilter != null) {
theFilter.setDateRange(theDateRange);
}
}
/**
* Apply the State.
*/
private void applyState() {
/* Adjust the lock-down */
setEnabled(true);
theDepositButton.setValue(theDeposit);
theCatButton.setValue(theCategory);
}
}
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\controls\MoneyWiseXLoanAnalysisSelect.java | MoneyWise Personal Finance - Core | 494 |
| net\sourceforge\joceanus\moneywise\lethe\ui\controls\MoneyWiseLoanAnalysisSelect.java | MoneyWise Personal Finance - Core | 494 |
theFilter = new MoneyWiseXAnalysisLoanFilter(theLoan);
theFilter.setDateRange(theDateRange);
} else {
theFilter = null;
}
}
/**
* Set new Category.
* @param pCategory the Category
* @return true/false did a change occur
*/
private boolean setCategory(final MoneyWiseLoanCategory pCategory) {
/* Adjust the selected category */
if (!MetisDataDifference.isEqual(pCategory, theCategory)) {
setTheLoan(pCategory, getDefaultLoan(pCategory));
return true;
}
return false;
}
/**
* Set the dateRange.
* @param pRange the dateRange
*/
private void setDateRange(final OceanusDateRange pRange) {
/* Store the dateRange */
theDateRange = pRange;
if (theFilter != null) {
theFilter.setDateRange(theDateRange);
}
}
/**
* Apply the State.
*/
private void applyState() {
/* Adjust the lock-down */
setEnabled(true);
theLoanButton.setValue(theLoan);
theCatButton.setValue(theCategory);
}
}
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseLoanInfoSet.java | MoneyWise Personal Finance - Core | 105 |
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseSecurityInfoSet.java | MoneyWise Personal Finance - Core | 122 |
return myValue != null
? myValue
: MetisDataFieldValue.SKIP;
}
/**
* Obtain the class of the field if it is an infoSet field.
* @param pField the field
* @return the class
*/
public static MoneyWiseAccountInfoClass getClassForField(final MetisDataFieldId pField) {
/* Look up field in map */
return FIELDSET_MAP.get(pField);
}
/**
* Obtain the field for the infoSet class.
* @param pClass the class
* @return the field
*/
public static MetisDataFieldId getFieldForClass(final MoneyWiseAccountInfoClass pClass) {
/* Look up field in map */
return REVERSE_FIELDMAP.get(pClass);
}
@Override
public MetisDataFieldId getFieldForClass(final PrometheusDataInfoClass pClass) {
return getFieldForClass((MoneyWiseAccountInfoClass) pClass);
}
@Override
public Iterator<PrometheusDataInfoClass> classIterator() {
final PrometheusDataInfoClass[] myValues = MoneyWiseAccountInfoClass.values();
return Arrays.stream(myValues).iterator();
}
/**
* Clone the dataInfoSet.
* @param pSource the InfoSet to clone
*/
protected void cloneDataInfoSet(final MoneyWiseLoanInfoSet pSource) { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWisePayeeInfoSet.java | MoneyWise Personal Finance - Core | 104 |
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseSecurityInfoSet.java | MoneyWise Personal Finance - Core | 122 |
return myValue != null
? myValue
: MetisDataFieldValue.SKIP;
}
/**
* Obtain the class of the field if it is an infoSet field.
* @param pField the field
* @return the class
*/
public static MoneyWiseAccountInfoClass getClassForField(final MetisDataFieldId pField) {
/* Look up field in map */
return FIELDSET_MAP.get(pField);
}
/**
* Obtain the field for the infoSet class.
* @param pClass the class
* @return the field
*/
public static MetisDataFieldId getFieldForClass(final MoneyWiseAccountInfoClass pClass) {
/* Look up field in map */
return REVERSE_FIELDMAP.get(pClass);
}
@Override
public MetisDataFieldId getFieldForClass(final PrometheusDataInfoClass pClass) {
return getFieldForClass((MoneyWiseAccountInfoClass) pClass);
}
@Override
public Iterator<PrometheusDataInfoClass> classIterator() {
final PrometheusDataInfoClass[] myValues = MoneyWiseAccountInfoClass.values();
return Arrays.stream(myValues).iterator();
}
/**
* Clone the dataInfoSet.
* @param pSource the InfoSet to clone
*/
protected void cloneDataInfoSet(final MoneyWisePayeeInfoSet pSource) { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWisePortfolioInfoSet.java | MoneyWise Personal Finance - Core | 104 |
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseSecurityInfoSet.java | MoneyWise Personal Finance - Core | 122 |
return myValue != null
? myValue
: MetisDataFieldValue.SKIP;
}
/**
* Obtain the class of the field if it is an infoSet field.
* @param pField the field
* @return the class
*/
public static MoneyWiseAccountInfoClass getClassForField(final MetisDataFieldId pField) {
/* Look up field in map */
return FIELDSET_MAP.get(pField);
}
/**
* Obtain the field for the infoSet class.
* @param pClass the class
* @return the field
*/
public static MetisDataFieldId getFieldForClass(final MoneyWiseAccountInfoClass pClass) {
/* Look up field in map */
return REVERSE_FIELDMAP.get(pClass);
}
@Override
public MetisDataFieldId getFieldForClass(final PrometheusDataInfoClass pClass) {
return getFieldForClass((MoneyWiseAccountInfoClass) pClass);
}
@Override
public Iterator<PrometheusDataInfoClass> classIterator() {
final PrometheusDataInfoClass[] myValues = MoneyWiseAccountInfoClass.values();
return Arrays.stream(myValues).iterator();
}
/**
* Clone the dataInfoSet.
* @param pSource the InfoSet to clone
*/
protected void cloneDataInfoSet(final MoneyWisePortfolioInfoSet pSource) { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\lethe\reports\MoneyWiseReportAssetGains.java | MoneyWise Personal Finance - Core | 105 |
| net\sourceforge\joceanus\moneywise\lethe\reports\MoneyWiseReportPortfolioView.java | MoneyWise Personal Finance - Core | 126 |
theBuilder.makeTitleCell(myTable, TEXT_GAINS);
/* Loop through the Portfolio Buckets */
final Iterator<MoneyWiseAnalysisPortfolioBucket> myIterator = myPortfolios.iterator();
while (myIterator.hasNext()) {
final MoneyWiseAnalysisPortfolioBucket myBucket = myIterator.next();
/* Access bucket name */
final String myName = myBucket.getName();
/* Access values */
final MoneyWiseAnalysisSecurityValues myValues = myBucket.getValues();
/* Format the Asset */
theBuilder.startRow(myTable);
theBuilder.makeDelayLinkCell(myTable, myName);
/* Handle values bucket value */
theBuilder.makeValueCell(myTable, myBucket.getNonCashValue(false));
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseAnalysisSecurityAttr.RESIDUALCOST));
theBuilder.makeValueCell(myTable, myValues.getMoneyValue(MoneyWiseAnalysisSecurityAttr.REALISEDGAINS)); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\ui\base\MoneyWiseCategoryTable.java | MoneyWise Personal Finance - Core | 148 |
| net\sourceforge\joceanus\moneywise\ui\panel\MoneyWiseRegionTable.java | MoneyWise Personal Finance - Core | 113 |
| net\sourceforge\joceanus\moneywise\ui\panel\MoneyWiseTransTagTable.java | MoneyWise Personal Finance - Core | 113 |
final TethysUIIconMapSet<MetisAction> myActionMapSet = MetisIcon.configureStatusIconButton(myGuiFactory);
myTable.declareIconColumn(PrometheusDataResource.DATAITEM_TOUCH, MetisAction.class)
.setIconMapSet(r -> myActionMapSet)
.setCellValueFactory(r -> r.isActive() ? MetisAction.ACTIVE : MetisAction.DELETE)
.setName(MoneyWiseUIResource.STATICDATA_ACTIVE.getValue())
.setEditable(true)
.setCellEditable(r -> !r.isActive())
.setColumnWidth(WIDTH_ICON)
.setOnCommit((r, v) -> updateField(this::deleteRow, r, v));
/* Add listeners */
myNewButton.getEventRegistrar().addEventListener(e -> addNewItem()); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\ui\panel\MoneyWiseAccountPanel.java | MoneyWise Personal Finance - Core | 554 |
| net\sourceforge\joceanus\moneywise\ui\panel\MoneyWiseCategoryPanel.java | MoneyWise Personal Finance - Core | 535 |
showPanel(PanelName.PAYEES);
}
}
/**
* Show panel.
* @param pName the panel name
*/
private void showPanel(final PanelName pName) {
/* Obtain name of panel */
final String myName = pName.toString();
/* Move correct card to front */
theCardPanel.selectCard(myName);
theFilterCardPanel.selectCard(myName);
/* Note the active panel */
theActive = pName;
theSelectButton.setFixedText(myName);
/* Determine the focus */
determineFocus();
}
/**
* Set Visibility.
*/
protected void setVisibility() {
/* Determine whether we have updates */
final boolean hasUpdates = hasUpdates();
final boolean isItemEditing = isItemEditing();
/* Update the action buttons */
theActionButtons.setEnabled(true);
theActionButtons.setVisible(hasUpdates && !isItemEditing);
/* Update the selection */
theSelectButton.setEnabled(!isItemEditing);
theFilterCardPanel.setEnabled(!isItemEditing);
/* Alert listeners that there has been a change */
theEventManager.fireEvent(PrometheusDataEvent.ADJUSTVISIBILITY);
}
/**
* handleErrorPane.
*/
private void handleErrorPane() { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\ui\panel\MoneyWiseMarketPricesTable.java | MoneyWise Personal Finance - Core | 391 |
| net\sourceforge\joceanus\moneywise\ui\panel\MoneyWiseMarketRatesTable.java | MoneyWise Personal Finance - Core | 385 |
}
@Override
public OceanusEventRegistrar<PrometheusDataEvent> getEventRegistrar() {
return theEventManager.getEventRegistrar();
}
/**
* handleErrorPane.
*/
private void handleErrorPane() {
/* Determine whether we have an error */
final boolean isError = theError.hasError();
/* Hide selection panel on error */
theTable.getSelect().setVisible(!isError);
/* Lock scroll area */
theTable.setEnabled(!isError);
/* Lock Action Buttons */
theActionButtons.setEnabled(!isError);
}
/**
* handle Action Buttons.
* @param pEvent the event
*/
private void handleActionButtons(final OceanusEvent<PrometheusUIEvent> pEvent) {
/* Cancel editing */
theTable.cancelEditing();
/* Perform the command */
theEditSet.processCommand(pEvent.getEventId(), theError);
/* Adjust for changes */
theTable.notifyChanges();
}
/**
* Determine Focus.
*/
public void determineFocus() {
/* Request the focus */
theTable.determineFocus(); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\tethys\javafx\button\TethysUIFXDateButtonManager.java | Tethys JavaFX Utilities | 89 |
| net\sourceforge\joceanus\tethys\swing\button\TethysUISwingDateRangeSelector.java | Tethys Java Swing Utilities | 44 |
| net\sourceforge\joceanus\tethys\swing\button\TethysUISwingIconButtonManager.java | Tethys Java Swing Utilities | 47 |
| net\sourceforge\joceanus\tethys\swing\button\TethysUISwingListButtonManager.java | Tethys Java Swing Utilities | 68 |
| net\sourceforge\joceanus\tethys\swing\button\TethysUISwingScrollButtonManager.java | Tethys Java Swing Utilities | 78 |
theDialog.showDialogUnderNode(getNode().getNode());
}
@Override
public void setPreferredWidth(final Integer pWidth) {
getNode().setPreferredWidth(pWidth);
}
@Override
public void setPreferredHeight(final Integer pHeight) {
getNode().setPreferredHeight(pHeight);
}
@Override
public void setBorderPadding(final Integer pPadding) {
super.setBorderPadding(pPadding);
getNode().createWrapperPane(getBorderTitle(), getBorderPadding());
}
@Override
public void setBorderTitle(final String pTitle) {
super.setBorderTitle(pTitle);
getNode().createWrapperPane(getBorderTitle(), getBorderPadding());
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianZuc128Engine.java | GordianKnot Security Framework | 319 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianZuc128Engine.java | GordianKnot Security Framework | 355 |
private void lfsrWithInitialisationMode(final int u) {
int f = lfsrState[0];
int v = mulByPow2(lfsrState[0], 8);
f = addM(f, v);
v = mulByPow2(lfsrState[4], 20);
f = addM(f, v);
v = mulByPow2(lfsrState[10], 21);
f = addM(f, v);
v = mulByPow2(lfsrState[13], 17);
f = addM(f, v);
v = mulByPow2(lfsrState[15], 15);
f = addM(f, v); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\reports\MoneyWiseXReportCapitalGains.java | MoneyWise Personal Finance - Core | 121 |
| net\sourceforge\joceanus\moneywise\lethe\reports\MoneyWiseReportCapitalGains.java | MoneyWise Personal Finance - Core | 121 |
theEndDate = pAnalysis.getDateRange().getEnd();
/* Start the report */
final Element myBody = theBuilder.startReport();
theBuilder.makeTitle(myBody, TEXT_TITLE, theFormatter.formatObject(theEndDate));
theBuilder.makeSubTitle(myBody, theSecurity.getDecoratedName());
/* Initialise the table */
theTable = theBuilder.startTable(myBody);
theBuilder.startHdrRow(theTable);
theBuilder.makeTitleCell(theTable, MoneyWiseBasicResource.MONEYWISEDATA_FIELD_DATE.getValue());
theBuilder.makeTitleCell(theTable, MoneyWiseBasicDataType.TRANSACTION.getItemName());
/* Format the history */
formatHistory();
/* Return the document */
return theBuilder.getDocument();
}
/**
* format the cost history.
*/
private void formatHistory() { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\controls\MoneyWiseXAnalysisSelect.java | MoneyWise Personal Finance - Core | 941 |
| net\sourceforge\joceanus\moneywise\lethe\ui\controls\MoneyWiseAnalysisSelect.java | MoneyWise Personal Finance - Core | 961 |
theAnalysis = theAnalysisMgr.getRangedAnalysis(getRange());
setAnalysis();
/* Validate state and apply */
checkType();
theState.applyState();
/* Remove refreshing flag and notify listeners */
isRefreshing = false;
theEventManager.fireEvent(PrometheusDataEvent.SELECTIONCHANGED);
}
}
/**
* Set RangeSelect visibility.
* @param pVisible the visibility setting
*/
private void setRangeVisibility(final boolean pVisible) {
theRangeButton.setIcon(pVisible
? TethysUIArrowIconId.UP
: TethysUIArrowIconId.DOWN);
theRangeSelect.setVisible(pVisible);
isRangeVisible = pVisible;
}
/**
* Set FilterSelect visibility.
* @param pVisible the visibility setting
*/
private void setFilterVisibility(final boolean pVisible) {
theFilterButton.setIcon(pVisible
? TethysUIArrowIconId.UP
: TethysUIArrowIconId.DOWN);
theFilterSelect.setVisible(pVisible);
isFilterVisible = pVisible;
}
/**
* Handle New Bucket.
*/
private void handleNewBucket() {
/* Ignore if we are refreshing */
if (isRefreshing) {
return;
}
final MoneyWiseXAnalysisAttribute myBucket = theBucketButton.getValue(); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianBlake2XEngine.java | GordianKnot Security Framework | 71 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianBlake3Engine.java | GordianKnot Security Framework | 68 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSkeinXofEngine.java | GordianKnot Security Framework | 72 |
reset(pSource);
}
/**
* initialise a Blake2X cipher.
* @param forEncryption whether or not we are for encryption.
* @param params the parameters required to set up the cipher.
* @exception IllegalArgumentException if the params argument is inappropriate.
*/
public void init(final boolean forEncryption,
final CipherParameters params) {
/*
* Blake2X encryption and decryption is completely symmetrical, so the 'forEncryption' is
* irrelevant. (Like 90% of stream ciphers)
*/
/* Determine parameters */
CipherParameters myParams = params;
byte[] newKey = null;
byte[] newIV = null;
if ((myParams instanceof ParametersWithIV)) {
final ParametersWithIV ivParams = (ParametersWithIV) myParams;
newIV = ivParams.getIV();
myParams = ivParams.getParameters();
}
if (myParams instanceof KeyParameter) {
final KeyParameter keyParam = (KeyParameter) myParams;
newKey = keyParam.getKey();
}
if (newKey == null || newIV == null) {
throw new IllegalArgumentException("A key and IV must be provided"); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\panel\MoneyWiseXReportTab.java | MoneyWise Personal Finance - Core | 270 |
| net\sourceforge\joceanus\moneywise\lethe\ui\panel\MoneyWiseReportTab.java | MoneyWise Personal Finance - Core | 264 |
: theAnalysisMgr.getRangedAnalysis(myRange);
/* Record analysis and build report */
theSelect.setAnalysis(myAnalysis);
final Document myDoc = theBuilder.createReport(myAnalysis, myReportType, mySecurity);
/* Declare to debugger */
theSpotEntry.setObject(myAnalysis);
theSpotEntry.setVisible(true);
/* Declare the document */
theManager.setDocument(myDoc);
/* Create initial display version */
final String myText = theManager.formatXML();
theHTMLPane.setHTMLContent(myText, "");
}
/**
* handleErrorPane.
*/
private void handleErrorPane() {
/* Determine whether we have an error */
final boolean isError = theError.hasError();
/* Hide selection panel on error */
theSelect.setVisible(!isError);
/* Lock HTML area */
theHTMLPane.setEnabled(!isError);
}
/**
* handleGoToRequest.
* @param pEvent the event
*/
private void handleGoToRequest(final OceanusEvent<MetisReportEvent> pEvent) {
/* Access the filter */
final MoneyWiseXAnalysisFilter<?, ?> myFilter = pEvent.getDetails(MoneyWiseXAnalysisFilter.class); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\lethe\reports\MoneyWiseReportMarketGrowth.java | MoneyWise Personal Finance - Core | 170 |
| net\sourceforge\joceanus\moneywise\lethe\reports\MoneyWiseReportMarketGrowth.java | MoneyWise Personal Finance - Core | 193 |
theBuilder.makeTotalCell(myTable, myBucket.getNonCashValue(true));
theBuilder.makeTotalCell(myTable, myValues.getMoneyValue(MoneyWiseAnalysisSecurityAttr.INVESTED));
theBuilder.makeTotalCell(myTable, myValues.getMoneyValue(MoneyWiseAnalysisSecurityAttr.GROWTHADJUST));
theBuilder.makeTotalCell(myTable, myValues.getMoneyValue(MoneyWiseAnalysisSecurityAttr.REALISEDGAINS));
theBuilder.makeTotalCell(myTable, myValues.getMoneyValue(MoneyWiseAnalysisSecurityAttr.MARKETGROWTH));
if (hasForeign) {
theBuilder.makeTotalCell(myTable, myValues.getMoneyValue(MoneyWiseAnalysisSecurityAttr.CURRENCYFLUCT));
}
theBuilder.makeTotalCell(myTable, myValues.getMoneyValue(MoneyWiseAnalysisSecurityAttr.MARKETPROFIT));
checkPortfolioGrowth(myBucket); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\ui\controls\MoneyWiseSpotPricesSelect.java | MoneyWise Personal Finance - Core | 319 |
| net\sourceforge\joceanus\moneywise\ui\controls\MoneyWiseSpotRatesSelect.java | MoneyWise Personal Finance - Core | 236 |
public final void setRange(final OceanusDateRange pRange) {
final OceanusDate myStart = (pRange == null)
? null
: pRange.getStart();
final OceanusDate myEnd = (pRange == null)
? null
: pRange.getEnd();
/* Set up range */
theDateButton.setEarliestDate(myStart);
theDateButton.setLatestDate(myEnd);
}
@Override
public void setEnabled(final boolean bEnabled) {
theNext.setEnabled(bEnabled && (theState.getNextDate() != null));
thePrev.setEnabled(bEnabled && (theState.getPrevDate() != null));
theDateButton.setEnabled(bEnabled); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianRabbitEngine.java | GordianKnot Security Framework | 112 |
| net\sourceforge\joceanus\gordianknot\impl\ext\engines\GordianSosemanukEngine.java | GordianKnot Security Framework | 65 |
private GordianRabbitEngine(final GordianRabbitEngine pSource) {
reset(pSource);
}
/**
* initialise a Rabbit cipher.
* @param forEncryption whether or not we are for encryption.
* @param params the parameters required to set up the cipher.
* @exception IllegalArgumentException if the params argument is inappropriate.
*/
public void init(final boolean forEncryption,
final CipherParameters params) {
/*
* encryption and decryption is completely symmetrical, so the 'forEncryption' is
* irrelevant. (Like 90% of stream ciphers)
*/
/* Determine parameters */
CipherParameters myParams = params;
byte[] newKey = null;
byte[] newIV = null;
if ((myParams instanceof ParametersWithIV)) {
final ParametersWithIV ivParams = (ParametersWithIV) myParams;
newIV = ivParams.getIV();
myParams = ivParams.getParameters();
}
if (myParams instanceof KeyParameter) {
final KeyParameter keyParam = (KeyParameter) myParams;
newKey = keyParam.getKey();
}
/* Initialise engine and mark as initialised */
theIndex = 0;
setKey(newKey);
setIV(newIV); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\panel\MoneyWiseXEventTable.java | MoneyWise Personal Finance - Core | 562 |
| net\sourceforge\joceanus\moneywise\lethe\ui\panel\MoneyWiseTransactionTable.java | MoneyWise Personal Finance - Core | 567 |
void selectStatement(final MoneyWiseXStatementSelect pSelect) {
/* Update selection */
theSelect.selectStatement(pSelect);
/* Set the filter */
theFilter = theSelect.getFilter();
/* Ensure that columns are correct */
adjustColumns(theSelect.showColumns()
? theSelect.getColumns()
: MoneyWiseAnalysisColumnSet.BALANCE);
/* Update the lists */
updateList();
}
/**
* handleErrorPane.
*/
private void handleErrorPane() {
/* Determine whether we have an error */
final boolean isError = theError.hasError();
/* Hide selection panel on error */
theSelect.setVisible(!isError);
/* Lock scroll area */
getTable().setEnabled(!isError);
/* Lock Action Buttons */
theActionButtons.setEnabled(!isError);
}
@Override
protected void refreshData() {
/* Obtain the active profile */
OceanusProfile myTask = getView().getActiveTask();
myTask = myTask.startTask("refreshData"); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\lethe\data\analysis\analyse\MoneyWiseAnalysisTransAnalyser.java | MoneyWise Personal Finance - Core | 1462 |
| net\sourceforge\joceanus\moneywise\lethe\data\analysis\analyse\MoneyWiseAnalysisTransAnalyser.java | MoneyWise Personal Finance - Core | 1627 |
final OceanusMoney myForeign = myInvested.convertCurrency(myCreditAsset.getCurrency().getCurrency(), myCreditRate);
myCreditAsset.adjustCounter(MoneyWiseAnalysisSecurityAttr.FOREIGNINVESTED, myForeign);
}
/* Determine final value of the credit stock after the takeOver */
myCreditUnits = myCreditAsset.getValues().getUnitsValue(MoneyWiseAnalysisSecurityAttr.UNITS);
OceanusMoney myCreditValue = myCreditUnits.valueAtPrice(myCreditPrice);
if (isForeignCredit) {
myCreditValue = myCreditValue.convertCurrency(myCurrency, myCreditRate);
}
/* Register the transaction */
final MoneyWiseAnalysisSecurityValues myCreditValues = myCreditAsset.registerTransaction(theHelper);
myCreditValues.setValue(MoneyWiseAnalysisSecurityAttr.PRICE, myCreditPrice);
myCreditValues.setValue(MoneyWiseAnalysisSecurityAttr.XFERREDVALUE, myCreditXferValue);
myCreditValues.setValue(MoneyWiseAnalysisSecurityAttr.XFERREDCOST, myDebitCost); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\tethys\javafx\chart\TethysUIFXAreaChart.java | Tethys JavaFX Utilities | 119 |
| net\sourceforge\joceanus\tethys\javafx\chart\TethysUIFXPieChart.java | Tethys JavaFX Utilities | 55 |
theSeries = new HashMap<>();
/* Create Node */
theNode = new TethysUIFXNode(theChart);
}
@Override
public TethysUIFXNode getNode() {
return theNode;
}
@Override
public void setVisible(final boolean pVisible) {
theNode.setManaged(pVisible);
theNode.setVisible(pVisible);
}
@Override
public void setEnabled(final boolean pEnabled) {
theChart.setDisable(!pEnabled);
}
@Override
public void setPreferredWidth(final Integer pWidth) {
theChart.setPrefWidth(pWidth);
}
@Override
public void setPreferredHeight(final Integer pHeight) {
theChart.setPrefHeight(pHeight);
}
@Override
public void updateAreaChart(final TethysUIAreaChartData pData) { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\tethys\javafx\chart\TethysUIFXBarChart.java | Tethys JavaFX Utilities | 82 |
| net\sourceforge\joceanus\tethys\javafx\chart\TethysUIFXPieChart.java | Tethys JavaFX Utilities | 55 |
theSeries = new HashMap<>();
/* Create Node */
theNode = new TethysUIFXNode(theChart);
}
@Override
public TethysUIFXNode getNode() {
return theNode;
}
@Override
public void setVisible(final boolean pVisible) {
theNode.setManaged(pVisible);
theNode.setVisible(pVisible);
}
@Override
public void setEnabled(final boolean pEnabled) {
theChart.setDisable(!pEnabled);
}
@Override
public void setPreferredWidth(final Integer pWidth) {
theChart.setPrefWidth(pWidth);
}
@Override
public void setPreferredHeight(final Integer pHeight) {
theChart.setPrefHeight(pHeight);
}
@Override
public void updateBarChart(final TethysUIBarChartData pData) { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\controls\MoneyWiseXAnalysisSelect.java | MoneyWise Personal Finance - Core | 989 |
| net\sourceforge\joceanus\moneywise\lethe\ui\controls\MoneyWiseAnalysisSelect.java | MoneyWise Personal Finance - Core | 1009 |
final MoneyWiseXAnalysisFilter<?, ?> myFilter = theState.getFilter();
if (myBucket != null) {
myFilter.setCurrentAttribute(myBucket);
}
theState.applyState();
theEventManager.fireEvent(PrometheusDataEvent.SELECTIONCHANGED);
}
}
/**
* Handle New Columns.
*/
private void handleNewColumns() {
/* Ignore if we are refreshing */
if (isRefreshing) {
return;
}
/* Record the columns */
final MoneyWiseAnalysisColumnSet mySet = theColumnButton.getValue();
if (theState.setColumns(mySet)) {
theState.applyState();
theEventManager.fireEvent(PrometheusDataEvent.SELECTIONCHANGED);
}
}
/**
* Handle FilterType.
*/
private void handleFilterType() {
/* Ignore if we are refreshing */
if (isRefreshing) {
return;
}
/* If the type has changed */
final MoneyWiseXAnalysisType myType = theFilterTypeButton.getValue(); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\controls\MoneyWiseXDepositAnalysisSelect.java | MoneyWise Personal Finance - Core | 174 |
| net\sourceforge\joceanus\moneywise\lethe\ui\controls\MoneyWiseDepositAnalysisSelect.java | MoneyWise Personal Finance - Core | 174 |
public MoneyWiseXAnalysisDepositFilter getFilter() {
return theState.getFilter();
}
@Override
public boolean isAvailable() {
return theDeposits != null
&& !theDeposits.isEmpty();
}
/**
* Create SavePoint.
*/
protected void createSavePoint() {
/* Create the savePoint */
theSavePoint = new MoneyWiseDepositState(theState);
}
/**
* Restore SavePoint.
*/
protected void restoreSavePoint() {
/* Restore the savePoint */
theState = new MoneyWiseDepositState(theSavePoint);
/* Apply the state */
theState.applyState();
}
@Override
public void setEnabled(final boolean bEnabled) {
/* Determine whether there are any Deposits to select */
final boolean dpAvailable = bEnabled && isAvailable();
/* Pass call on to buttons */
theDepositButton.setEnabled(dpAvailable);
theCatButton.setEnabled(dpAvailable);
}
/**
* Set analysis.
* @param pAnalysis the analysis.
*/
public void setAnalysis(final MoneyWiseXAnalysis pAnalysis) { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\controls\MoneyWiseXLoanAnalysisSelect.java | MoneyWise Personal Finance - Core | 174 |
| net\sourceforge\joceanus\moneywise\lethe\ui\controls\MoneyWiseLoanAnalysisSelect.java | MoneyWise Personal Finance - Core | 174 |
public MoneyWiseXAnalysisLoanFilter getFilter() {
return theState.getFilter();
}
@Override
public boolean isAvailable() {
return theLoans != null
&& !theLoans.isEmpty();
}
/**
* Create SavePoint.
*/
protected void createSavePoint() {
/* Create the savePoint */
theSavePoint = new MoneyWiseLoanState(theState);
}
/**
* Restore SavePoint.
*/
protected void restoreSavePoint() {
/* Restore the savePoint */
theState = new MoneyWiseLoanState(theSavePoint);
/* Apply the state */
theState.applyState();
}
@Override
public void setEnabled(final boolean bEnabled) {
/* Determine whether there are any Loans to select */
final boolean lnAvailable = bEnabled && isAvailable();
/* Pass call on to buttons */
theLoanButton.setEnabled(lnAvailable);
theCatButton.setEnabled(lnAvailable);
}
/**
* Set analysis.
* @param pAnalysis the analysis.
*/
public void setAnalysis(final MoneyWiseXAnalysis pAnalysis) { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\atlas\ui\dialog\MoneyWiseXTransactionDialog.java | MoneyWise Personal Finance - Core | 335 |
| net\sourceforge\joceanus\moneywise\lethe\ui\dialog\MoneyWiseTransactionDialog.java | MoneyWise Personal Finance - Core | 341 |
setEditable(false);
}
/**
* Update editors.
* @param pRange the date range.
*/
public void updateEditors(final OceanusDateRange pRange) {
/* Update the range */
theRange = pRange;
}
/**
* Handle dateConfig.
* @param pConfig the dateConfig
*/
private void handleDateConfig(final OceanusDateConfig pConfig) {
/* Update Date button */
pConfig.setEarliestDate(theRange != null
? theRange.getStart()
: null);
pConfig.setLatestDate(theRange != null
? theRange.getEnd()
: null);
}
@Override
public boolean isDeletable() {
return getItem() != null && !getItem().isReconciled();
}
@Override
protected void adjustFields(final boolean isEditable) {
/* Access the item */
final MoneyWiseTransaction myTrans = getItem().getTransaction(); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\ui\panel\MoneyWiseMarketPricesTable.java | MoneyWise Personal Finance - Core | 145 |
| net\sourceforge\joceanus\moneywise\ui\panel\MoneyWiseMarketRatesTable.java | MoneyWise Personal Finance - Core | 146 |
.setCellEditable(r -> r.getPrice() != null && !r.isDisabled())
.setColumnWidth(WIDTH_ICON)
.setOnCommit((r, v) -> updateField(this::deleteRow, r, v));
/* Add listeners */
theSelect.getEventRegistrar().addEventListener(PrometheusDataEvent.SELECTIONCHANGED, e -> handleNewSelection());
theSelect.getEventRegistrar().addEventListener(PrometheusDataEvent.DOWNLOAD, e -> downloadPrices());
pView.getEventRegistrar().addEventListener(e -> refreshData());
pEditSet.getEventRegistrar().addEventListener(e -> updateTableData());
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\tethys\swing\chart\TethysUISwingBarChart.java | Tethys Java Swing Utilities | 110 |
| net\sourceforge\joceanus\tethys\swing\chart\TethysUISwingPieChart.java | Tethys Java Swing Utilities | 95 |
selectSection(section.getRowKey() + ":" + section.getColumnKey());
}
}
});
/* Create the node */
theNode = new TethysUISwingNode(thePanel);
}
@Override
public TethysUISwingNode getNode() {
return theNode;
}
@Override
public void setVisible(final boolean pVisible) {
theNode.setVisible(pVisible);
}
@Override
public void setEnabled(final boolean pEnabled) {
thePanel.setEnabled(pEnabled);
}
@Override
public void setPreferredWidth(final Integer pWidth) {
theNode.setPreferredWidth(pWidth);
}
@Override
public void setPreferredHeight(final Integer pHeight) {
theNode.setPreferredHeight(pHeight);
}
@Override
public void updateBarChart(final TethysUIBarChartData pData) { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\tethys\swing\control\TethysUISwingTextArea.java | Tethys Java Swing Utilities | 64 |
| net\sourceforge\joceanus\tethys\swing\pane\TethysUISwingFlowPaneManager.java | Tethys Java Swing Utilities | 70 |
| net\sourceforge\joceanus\tethys\swing\pane\TethysUISwingTabPaneManager.java | Tethys Java Swing Utilities | 98 |
theArea.setVisible(pVisible);
}
@Override
public void setPreferredWidth(final Integer pWidth) {
theNode.setPreferredWidth(pWidth);
}
@Override
public void setPreferredHeight(final Integer pHeight) {
theNode.setPreferredHeight(pHeight);
}
@Override
public void setBorderPadding(final Integer pPadding) {
super.setBorderPadding(pPadding);
theNode.createWrapperPane(getBorderTitle(), getBorderPadding());
}
@Override
public void setBorderTitle(final String pTitle) {
super.setBorderTitle(pTitle);
theNode.createWrapperPane(getBorderTitle(), getBorderPadding());
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\core\cipher\GordianCoreCipherParameters.java | GordianKnot Security Framework | 334 |
| net\sourceforge\joceanus\gordianknot\impl\core\cipher\GordianCoreCipherParameters.java | GordianKnot Security Framework | 365 |
myPassword = PBEParametersGenerator.PKCS5PasswordToUTF8Bytes(pPassword);
myGenerator.init(myPassword, thePBESalt, mySpec.getIterationCount());
/* Generate the parameters */
final int myKeyLen = theSpec.getKeyType().getKeyLength().getLength();
final int myIVLen = theSpec.needsIV() ? Byte.SIZE * theSpec.getIVLength() : 0;
return myIVLen == 0
? myGenerator.generateDerivedParameters(myKeyLen)
: myGenerator.generateDerivedParameters(myKeyLen, myIVLen);
} finally {
if (myPassword != null) {
Arrays.fill(myPassword, (byte) 0);
}
}
}
/**
* derive PKCS12 key and IV.
* @param pPassword the password
* @return the parameters
*/
private CipherParameters derivePKCS12Parameters(final char[] pPassword) { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\ext\digests\GordianBlake2bDigest.java | GordianKnot Security Framework | 149 |
| net\sourceforge\joceanus\gordianknot\impl\ext\digests\GordianBlake2sDigest.java | GordianKnot Security Framework | 149 |
return new GordianBlake2bDigest(this);
}
@Override
void adjustCounter(final int pCount) {
t0 += pCount;
if (t0 == 0) {
t1++;
}
}
@Override
void completeCounter(final int pCount) {
t0 += pCount;
if (pCount > 0 && t0 == 0) {
t1++;
}
}
@Override
void outputDigest(final byte[] pOut,
final int pOutOffset) {
/* Loop to provide the output */
final int myDigestLen = getDigestSize();
for (int i = 0, j = 0; i < NUMWORDS && j < myDigestLen; i++, j += Long.BYTES) { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseTransInfoSet.java | MoneyWise Personal Finance - Core | 626 |
| net\sourceforge\joceanus\moneywise\data\validate\MoneyWiseValidateTransInfoSet.java | MoneyWise Personal Finance - Core | 451 |
switch (pClass) {
case QUALIFYYEARS:
validateQualifyYears(pInfo);
break;
case TAXCREDIT:
validateTaxCredit(pInfo);
break;
case EMPLOYEENATINS:
case EMPLOYERNATINS:
case DEEMEDBENEFIT:
case WITHHELD:
validateOptionalTaxCredit(pInfo);
break;
case PARTNERAMOUNT:
validatePartnerAmount(pInfo);
break;
case RETURNEDCASHACCOUNT:
validateReturnedCashAccount(pInfo);
break;
case RETURNEDCASH:
validateReturnedCash(pInfo);
break;
case ACCOUNTDELTAUNITS:
case PARTNERDELTAUNITS:
validateDeltaUnits(pInfo);
break;
case REFERENCE:
case COMMENTS:
validateInfoLength(pInfo);
break;
case PRICE:
validatePrice(pInfo);
break;
case TRANSTAG:
case DILUTION:
default:
break;
}
} | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\ui\dialog\MoneyWisePayeeDialog.java | MoneyWise Personal Finance - Core | 142 |
| net\sourceforge\joceanus\moneywise\ui\dialog\MoneyWisePortfolioDialog.java | MoneyWise Personal Finance - Core | 151 |
theFieldSet.addField(MoneyWiseAccountInfoClass.REFERENCE, myReference, MoneyWisePayee::getReference);
/* Configure validation checks */
mySortCode.setValidator(this::isValidSortCode);
myAccount.setValidator(this::isValidAccount);
myReference.setValidator(this::isValidReference);
}
/**
* Build web subPanel.
* @param pFactory the GUI factory
*/
private void buildWebPanel(final TethysUIFactory<?> pFactory) {
/* Create a new panel */
theFieldSet.newPanel(TAB_WEB);
/* Allocate fields */
final TethysUIFieldFactory myFields = pFactory.fieldFactory();
final TethysUICharArrayEditField myWebSite = myFields.newCharArrayField();
final TethysUICharArrayEditField myCustNo = myFields.newCharArrayField();
final TethysUICharArrayEditField myUserId = myFields.newCharArrayField();
final TethysUICharArrayEditField myPassWord = myFields.newCharArrayField();
/* Assign the fields to the panel */
theFieldSet.addField(MoneyWiseAccountInfoClass.WEBSITE, myWebSite, MoneyWisePayee::getWebSite); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\ui\panel\MoneyWiseCashCategoryTable.java | MoneyWise Personal Finance - Core | 220 |
| net\sourceforge\joceanus\moneywise\ui\panel\MoneyWiseDepositCategoryTable.java | MoneyWise Personal Finance - Core | 220 |
| net\sourceforge\joceanus\moneywise\ui\panel\MoneyWiseLoanCategoryTable.java | MoneyWise Personal Finance - Core | 220 |
final MoneyWiseCashCategory myCategory = theCategories.addNewItem();
myCategory.setDefaults(getParent());
/* Set as new and adjust map */
myTask.startTask("incrementVersion");
myCategory.setNewVersion();
myCategory.adjustMapForItem();
getEditSet().incrementVersion();
/* Validate the new item */
myTask.startTask("validate");
myCategory.validate();
/* update panel */
myTask.startTask("setItem");
theActiveCategory.setNewItem(myCategory);
/* Lock the table */
setTableEnabled(false);
myTask.end();
/* Handle Exceptions */
} catch (OceanusException e) {
/* Build the error */
final OceanusException myError = new MoneyWiseDataException("Failed to create new category", e);
/* Show the error */
setError(myError);
}
}
@Override
protected boolean isFiltered(final MoneyWiseCashCategory pRow) { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\tethys\javafx\dialog\TethysUIFXAboutBox.java | Tethys JavaFX Utilities | 68 |
| net\sourceforge\joceanus\tethys\javafx\dialog\TethysUIFXBusySpinner.java | Tethys JavaFX Utilities | 58 |
TethysUIFXAboutBox(final TethysUICoreFactory<?> pFactory,
final Stage pStage) {
/* Initialise underlying class */
super(pFactory);
if (pStage == null) {
throw new IllegalArgumentException("Cannot create Dialog during initialisation");
}
/* Store parameters */
theSceneRegister = (TethysUIFXSceneRegister) pFactory;
theStage = pStage;
thePanel = (Region) getNode().getNode();
}
@Override
public TethysUIFXNode getNode() {
return (TethysUIFXNode) super.getNode();
}
@Override
public void showDialog() {
/* If we have not made the dialog yet */
if (theDialog == null) {
makeDialog();
}
/* Centre on parent */
final double myX = (theStage.getWidth() - APPROX_WIDTH) / 2; | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\tethys\swing\chart\TethysUISwingAreaChart.java | Tethys Java Swing Utilities | 121 |
| net\sourceforge\joceanus\tethys\swing\chart\TethysUISwingBarChart.java | Tethys Java Swing Utilities | 110 |
| net\sourceforge\joceanus\tethys\swing\chart\TethysUISwingPieChart.java | Tethys Java Swing Utilities | 95 |
selectSeries((String) theDataSet.getSeriesKey(section.getSeriesIndex()));
}
}
});
/* Create the node */
theNode = new TethysUISwingNode(thePanel);
}
@Override
public TethysUISwingNode getNode() {
return theNode;
}
@Override
public void setVisible(final boolean pVisible) {
theNode.setVisible(pVisible);
}
@Override
public void setEnabled(final boolean pEnabled) {
thePanel.setEnabled(pEnabled);
}
@Override
public void setPreferredWidth(final Integer pWidth) {
theNode.setPreferredWidth(pWidth);
}
@Override
public void setPreferredHeight(final Integer pHeight) {
theNode.setPreferredHeight(pHeight);
}
@Override
public void updateAreaChart(final TethysUIAreaChartData pData) { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\tethys\swing\control\TethysUISwingTextArea.java | Tethys Java Swing Utilities | 65 |
| net\sourceforge\joceanus\tethys\swing\pane\TethysUISwingBoxPaneManager.java | Tethys Java Swing Utilities | 145 |
}
@Override
public void setPreferredWidth(final Integer pWidth) {
theNode.setPreferredWidth(pWidth);
}
@Override
public void setPreferredHeight(final Integer pHeight) {
theNode.setPreferredHeight(pHeight);
}
@Override
public void setBorderPadding(final Integer pPadding) {
super.setBorderPadding(pPadding);
theNode.createWrapperPane(getBorderTitle(), getBorderPadding());
}
@Override
public void setBorderTitle(final String pTitle) {
super.setBorderTitle(pTitle);
theNode.createWrapperPane(getBorderTitle(), getBorderPadding());
}
@Override
public void setText(final String pText) { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\core\agree\GordianCompositeAgreement.java | GordianKnot Security Framework | 391 |
| net\sourceforge\joceanus\gordianknot\impl\core\agree\GordianCompositeAgreement.java | GordianKnot Security Framework | 662 |
GordianCompositeBasicAgreement(final GordianCoreFactory pFactory,
final GordianAgreementSpec pSpec) throws GordianException {
/* Initialise super class */
super(pFactory, pSpec);
/* Create the list */
theAgreements = new ArrayList<>();
final GordianAgreementFactory myFactory = pFactory.getKeyPairFactory().getAgreementFactory();
final List<GordianAgreementSpec> mySubAgrees = getSubAgreements(pSpec);
for (GordianAgreementSpec mySpec : mySubAgrees) {
theAgreements.add(myFactory.createAgreement(mySpec));
}
}
@Override
public GordianAgreementMessageASN1 createClientHelloASN1(final GordianKeyPair pClient) throws GordianException {
/* Check keyPair */
checkKeyPair(pClient);
/* Create ephemeral key */
final GordianKeyPairFactory myFactory = getFactory().getKeyPairFactory();
final GordianCompositeKeyPair myClient = (GordianCompositeKeyPair) pClient; | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\gordianknot\impl\core\agree\GordianCoreBasicAgreement.java | GordianKnot Security Framework | 76 |
| net\sourceforge\joceanus\gordianknot\impl\core\agree\GordianCoreEphemeralAgreement.java | GordianKnot Security Framework | 246 |
final GordianAgreementMessageASN1 myClientHello = buildClientHelloASN1();
/* Set status */
setStatus(GordianAgreementStatus.AWAITING_SERVERHELLO);
/* Return the clientHello */
return myClientHello;
}
@Override
public byte[] acceptClientHello(final GordianKeyPair pClient,
final GordianKeyPair pServer,
final byte[] pClientHello) throws GordianException {
/* Must be in clean state */
checkStatus(GordianAgreementStatus.CLEAN);
/* Access the sequence */
final GordianAgreementMessageASN1 myClientHello = GordianAgreementMessageASN1.getInstance(pClientHello);
myClientHello.checkMessageType(GordianMessageType.CLIENTHELLO);
/* Accept the ASN1 */
final GordianAgreementMessageASN1 myServerHello = acceptClientHelloASN1(pClient, pServer, myClientHello);
return myServerHello.getEncodedBytes();
}
/**
* Accept the clientHello.
* @param pClient the client keyPair
* @param pServer the server keyPair
* @param pClientHello the incoming clientHello message
* @return the serverHello message
* @throws GordianException on error
*/
public abstract GordianAgreementMessageASN1 acceptClientHelloASN1(GordianKeyPair pClient,
GordianKeyPair pServer,
GordianAgreementMessageASN1 pClientHello) throws GordianException;
/**
* Process the incoming clientHello message request.
* @param pServer the server keyPair
* @param pClientHello the incoming clientHello message
* @throws GordianException on error
*/
protected void processClientHelloASN1(final GordianKeyPair pServer, | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseAssetBase.java | MoneyWise Personal Finance - Core | 133 |
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseCategoryBase.java | MoneyWise Personal Finance - Core | 85 |
final OceanusDataFormatter myFormatter = getDataSet().getDataFormatter();
/* Protect against exceptions */
try {
/* Store the name */
Object myValue = pValues.getValue(PrometheusDataResource.DATAITEM_FIELD_NAME);
if (myValue instanceof String) {
setValueName((String) myValue);
} else if (myValue instanceof byte[]) {
setValueName((byte[]) myValue);
}
/* Store the Description */
myValue = pValues.getValue(PrometheusDataResource.DATAITEM_FIELD_DESC);
if (myValue instanceof String) {
setValueDesc((String) myValue);
} else if (myValue instanceof byte[]) {
setValueDesc((byte[]) myValue);
}
/* Store the Category */
myValue = pValues.getValue(MoneyWiseBasicResource.CATEGORY_NAME); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseDeposit.java | MoneyWise Personal Finance - Core | 156 |
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseLoan.java | MoneyWise Personal Finance - Core | 152 |
| net\sourceforge\joceanus\moneywise\data\basic\MoneyWiseSecurity.java | MoneyWise Personal Finance - Core | 159 |
theInfoSet = new MoneyWiseDepositInfoSet(this, pList.getActInfoTypes(), pList.getDepositInfo());
hasInfoSet = true;
useInfoSet = true;
}
@Override
public MetisFieldSetDef getDataFieldSet() {
return FIELD_DEFS;
}
@Override
public boolean includeXmlField(final MetisDataFieldId pField) {
/* Determine whether fields should be included */
if (MoneyWiseBasicResource.CATEGORY_NAME.equals(pField)) {
return true;
}
if (MoneyWiseStaticDataType.CURRENCY.equals(pField)) {
return true;
}
if (MoneyWiseBasicResource.ASSET_PARENT.equals(pField)) {
return true;
}
/* Pass call on */
return super.includeXmlField(pField);
}
@Override
public Long getExternalId() {
return MoneyWiseAssetType.createExternalId(MoneyWiseAssetType.DEPOSIT, getIndexedId()); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\moneywise\ui\dialog\MoneyWiseCashDialog.java | MoneyWise Personal Finance - Core | 125 |
| net\sourceforge\joceanus\moneywise\ui\dialog\MoneyWiseSecurityDialog.java | MoneyWise Personal Finance - Core | 151 |
myCategoryButton.setMenuConfigurator(c -> buildCategoryMenu(c, getItem()));
myCurrencyButton.setMenuConfigurator(c -> buildCurrencyMenu(c, getItem()));
final Map<Boolean, TethysUIIconMapSet<Boolean>> myMapSets = MoneyWiseIcon.configureLockedIconButton(pFactory);
myClosedButton.setIconMapSet(() -> myMapSets.get(theClosedState));
/* Configure validation checks */
myName.setValidator(this::isValidName);
myDesc.setValidator(this::isValidDesc);
}
/**
* Build account subPanel.
* @param pFactory the GUI factory
*/
private void buildDetailsPanel(final TethysUIFactory<?> pFactory) {
/* Create a new panel */
theFieldSet.newPanel(TAB_DETAILS);
/* Allocate fields */
final TethysUIFieldFactory myFields = pFactory.fieldFactory();
final TethysUIMoneyEditField myOpening = myFields.newMoneyField(); | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\tethys\javafx\menu\TethysUIFXScrollMenu.java | Tethys JavaFX Utilities | 948 |
| net\sourceforge\joceanus\tethys\swing\menu\TethysUISwingScrollMenu.java | Tethys Java Swing Utilities | 1006 |
theUpItem.setVisible(theFirstIndex > 1);
}
/* Adjust first index */
theFirstIndex--;
}
/**
* request scroll.
*
* @param pDelta the delta to scroll.
*/
void requestScroll(final int pDelta) {
/* If this is a scroll downwards */
if (pDelta > 0) {
/* If we can scroll downwards */
final int myCount = theMenuItems.size();
final int mySpace = myCount - theFirstIndex - theMaxDisplayItems;
int myScroll = Math.min(mySpace, pDelta);
/* While we have space */
while (myScroll-- > 0) {
/* Scroll downwards */
scrollPlusOne();
}
/* else scroll upwards if we can */
} else if (theFirstIndex > 0) {
/* Determine space */
int myScroll = Math.min(theFirstIndex, -pDelta);
/* While we have space */
while (myScroll-- > 0) {
/* Scroll upwards */
scrollMinusOne();
}
}
}
/**
* Scroll element.
*/
public abstract static class TethysUIFXScrollElement { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\joceanus\themis\analysis\ThemisAnalysisBlock.java | Themis Core Project Framework | 78 |
| net\sourceforge\joceanus\themis\analysis\ThemisAnalysisFinally.java | Themis Core Project Framework | 72 |
final Deque<ThemisAnalysisElement> myLines = ThemisAnalysisBuilder.processBody(pParser);
/* Create a parser */
theContents = new ArrayDeque<>();
final ThemisAnalysisParser myParser = new ThemisAnalysisParser(myLines, theContents, this);
myParser.processLines();
}
@Override
public Deque<ThemisAnalysisElement> getContents() {
return theContents;
}
@Override
public ThemisAnalysisContainer getParent() {
return theParent;
}
@Override
public void setParent(final ThemisAnalysisContainer pParent) {
theParent = pParent;
theDataMap.setParent(pParent.getDataMap());
}
@Override
public ThemisAnalysisDataMap getDataMap() {
return theDataMap;
}
@Override
public int getNumLines() {
return theNumLines;
} | ||
