Compare commits

...

4 Commits

6 changed files with 46 additions and 57 deletions

View File

@ -37,8 +37,8 @@ public class SSInvoiceDialog {
/** /**
* *
* @param iMainFrame * @param iMainFrame SSMainFrame
* @param pModel * @param pModel SSInvoiceTableModel
*/ */
public static void newDialog(final SSMainFrame iMainFrame, final SSInvoiceTableModel pModel) { public static void newDialog(final SSMainFrame iMainFrame, final SSInvoiceTableModel pModel) {
final SSDialog iDialog = new SSDialog(iMainFrame, final SSDialog iDialog = new SSDialog(iMainFrame,
@ -106,9 +106,9 @@ public class SSInvoiceDialog {
/** /**
* *
* @param iMainFrame * @param iMainFrame SSMainFrame
* @param iInvoice * @param iInvoice SSInvoice
* @param pModel * @param pModel SSInvoiceTableModel
*/ */
public static void editDialog(final SSMainFrame iMainFrame, SSInvoice iInvoice, final SSInvoiceTableModel pModel) { public static void editDialog(final SSMainFrame iMainFrame, SSInvoice iInvoice, final SSInvoiceTableModel pModel) {
final String lockString = "invoice" + iInvoice.getNumber() final String lockString = "invoice" + iInvoice.getNumber()
@ -180,9 +180,9 @@ public class SSInvoiceDialog {
/** /**
* *
* @param iMainFrame * @param iMainFrame SSMainFrame
* @param iInvoice * @param iInvoice SSInvoice
* @param pModel * @param pModel SSInvoiceTableModel
*/ */
public static void copyDialog(final SSMainFrame iMainFrame, SSInvoice iInvoice, final SSInvoiceTableModel pModel) { public static void copyDialog(final SSMainFrame iMainFrame, SSInvoice iInvoice, final SSInvoiceTableModel pModel) {
final String lockString = "invoice" + iInvoice.getNumber() final String lockString = "invoice" + iInvoice.getNumber()
@ -265,10 +265,10 @@ public class SSInvoiceDialog {
/** /**
* *
* @param iMainFrame * @param iMainFrame SSMainFrame
* @param iInvoice * @param iInvoice SSInvoice
* @param iOrders * @param iOrders List<SSOrder>
* @param pModel * @param pModel AbstractTableModel
*/ */
public static void newDialog(final SSMainFrame iMainFrame, SSInvoice iInvoice, final List<SSOrder> iOrders, final AbstractTableModel pModel) { public static void newDialog(final SSMainFrame iMainFrame, SSInvoice iInvoice, final List<SSOrder> iOrders, final AbstractTableModel pModel) {
final String lockString = "ordertoinvoice" final String lockString = "ordertoinvoice"

View File

@ -52,9 +52,9 @@ public class SSInvoiceFrame extends SSDefaultTableFrame {
/** /**
* *
* @param pMainFrame * @param pMainFrame SSMainFrame
* @param pWidth * @param pWidth int
* @param pHeight * @param pHeight int
*/ */
public static void showFrame(SSMainFrame pMainFrame, int pWidth, int pHeight) { public static void showFrame(SSMainFrame pMainFrame, int pWidth, int pHeight) {
if (cInstance == null || SSInvoiceFrame.cInstance.isClosed()) { if (cInstance == null || SSInvoiceFrame.cInstance.isClosed()) {
@ -419,8 +419,8 @@ public class SSInvoiceFrame extends SSDefaultTableFrame {
/** /**
* *
* @param index * @param index int
* @param iInvoices * @param iInvoices List<SSInvoice>
*/ */
public void setFilterIndex(int index, List<SSInvoice> iInvoices) { public void setFilterIndex(int index, List<SSInvoice> iInvoices) {
JPanel iPanel = (JPanel) iTabbedPane.getComponentAt(index); JPanel iPanel = (JPanel) iTabbedPane.getComponentAt(index);
@ -473,7 +473,7 @@ public class SSInvoiceFrame extends SSDefaultTableFrame {
/** /**
* *
* @return * @return SSInvoiceTableModel
*/ */
public SSInvoiceTableModel getModel() { public SSInvoiceTableModel getModel() {
return iModel; return iModel;
@ -515,7 +515,7 @@ public class SSInvoiceFrame extends SSDefaultTableFrame {
/** /**
* *
* @param delete * @param delete List<SSInvoice>
*/ */
private void deleteSelectedInvoice(List<SSInvoice> delete) { private void deleteSelectedInvoice(List<SSInvoice> delete) {
if (delete.isEmpty()) { if (delete.isEmpty()) {
@ -587,14 +587,12 @@ public class SSInvoiceFrame extends SSDefaultTableFrame {
@Override @Override
public String toString() { public String toString() {
final StringBuilder sb = new StringBuilder();
sb.append("se.swedsoft.bookkeeping.gui.invoice.SSInvoiceFrame"); return "se.swedsoft.bookkeeping.gui.invoice.SSInvoiceFrame" +
sb.append("{iModel=").append(iModel); "{iModel=" + iModel +
sb.append(", iSearchPanel=").append(iSearchPanel); ", iSearchPanel=" + iSearchPanel +
sb.append(", iTabbedPane=").append(iTabbedPane); ", iTabbedPane=" + iTabbedPane +
sb.append(", iTable=").append(iTable); ", iTable=" + iTable +
sb.append('}'); '}';
return sb.toString();
} }
} }

View File

@ -74,13 +74,11 @@ public class SSInvoiceSearchPanel extends JPanel {
@Override @Override
public String toString() { public String toString() {
final StringBuilder sb = new StringBuilder();
sb.append("se.swedsoft.bookkeeping.gui.invoice.panel.SSInvoiceSearchPanel"); return "se.swedsoft.bookkeeping.gui.invoice.panel.SSInvoiceSearchPanel" +
sb.append("{iModel=").append(iModel); "{iModel=" + iModel +
sb.append(", iPanel=").append(iPanel); ", iPanel=" + iPanel +
sb.append(", iTextField=").append(iTextField); ", iTextField=" + iTextField +
sb.append('}'); '}';
return sb.toString();
} }
} }

View File

@ -182,10 +182,8 @@ public class SSInterestInvoiceTableModel extends SSDefaultTableModel<SSInvoice>
public void setValueAt(Object aValue, int rowIndex, int columnIndex) { public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
SSInvoice iInvoice = getObject(rowIndex); SSInvoice iInvoice = getObject(rowIndex);
switch (columnIndex) { if (columnIndex == 9) {
case 9:
iActions.put(iInvoice, (InterestAction) aValue); iActions.put(iInvoice, (InterestAction) aValue);
break;
} }
fireTableDataChanged(); fireTableDataChanged();
} }
@ -195,8 +193,8 @@ public class SSInterestInvoiceTableModel extends SSDefaultTableModel<SSInvoice>
* *
* Sets the "interest invoiced" flag on the invoices to true. * Sets the "interest invoiced" flag on the invoices to true.
* *
* @param iDescription * @param iDescription String
* @param iAccount * @param iAccount SSAccount
* @return the interest invoices * @return the interest invoices
*/ */
public List<SSInvoice> getInterestInvoices(String iDescription, SSAccount iAccount) { public List<SSInvoice> getInterestInvoices(String iDescription, SSAccount iAccount) {
@ -285,7 +283,7 @@ public class SSInterestInvoiceTableModel extends SSDefaultTableModel<SSInvoice>
/** /**
* *
* @param iTable * @param iTable SSTable
*/ */
public static void setupTable(SSTable iTable) { public static void setupTable(SSTable iTable) {
iTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); iTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
@ -327,7 +325,7 @@ public class SSInterestInvoiceTableModel extends SSDefaultTableModel<SSInvoice>
/** /**
* *
* @param iBundleName * @param iBundleName String
*/ */
InterestAction(String iBundleName) { InterestAction(String iBundleName) {
this.iBundleName = iBundleName; this.iBundleName = iBundleName;
@ -352,13 +350,10 @@ public class SSInterestInvoiceTableModel extends SSDefaultTableModel<SSInvoice>
@Override @Override
public String toString() { public String toString() {
final StringBuilder sb = new StringBuilder();
sb.append( return "se.swedsoft.bookkeeping.gui.invoice.util.SSInterestInvoiceTableModel.InterestAction" +
"se.swedsoft.bookkeeping.gui.invoice.util.SSInterestInvoiceTableModel.InterestAction"); "{iBundleName='" + iBundleName + '\'' +
sb.append("{iBundleName='").append(iBundleName).append('\''); '}';
sb.append('}');
return sb.toString();
} }
} }
@ -414,12 +409,10 @@ public class SSInterestInvoiceTableModel extends SSDefaultTableModel<SSInvoice>
@Override @Override
public String toString() { public String toString() {
final StringBuilder sb = new StringBuilder();
sb.append("se.swedsoft.bookkeeping.gui.invoice.util.SSInterestInvoiceTableModel"); return "se.swedsoft.bookkeeping.gui.invoice.util.SSInterestInvoiceTableModel" +
sb.append("{iActions=").append(iActions); "{iActions=" + iActions +
sb.append('}'); '}';
return sb.toString();
} }
} }

View File

@ -24,7 +24,7 @@ public class SSInvoiceRowTableModel extends SSEditableTableModel<SSSaleRow> {
/** /**
* *
* @return * @return SSSaleRow
*/ */
@Override @Override
public SSSaleRow newObject() { public SSSaleRow newObject() {

View File

@ -32,7 +32,7 @@ public class SSInvoiceTableModel extends SSTableModel<SSInvoice> {
/** /**
* Default constructor. * Default constructor.
* @param iInvoices * @param iInvoices List<SSInvoice>
*/ */
public SSInvoiceTableModel(List<SSInvoice> iInvoices) { public SSInvoiceTableModel(List<SSInvoice> iInvoices) {
super(iInvoices); super(iInvoices);
@ -50,7 +50,7 @@ public class SSInvoiceTableModel extends SSTableModel<SSInvoice> {
/** /**
* *
* @return * @return SSInvoiceTableModel
*/ */
public static SSInvoiceTableModel getDropDownModel() { public static SSInvoiceTableModel getDropDownModel() {
return getDropDownModel(SSDB.getInstance().getInvoices()); return getDropDownModel(SSDB.getInstance().getInvoices());
@ -58,8 +58,8 @@ public class SSInvoiceTableModel extends SSTableModel<SSInvoice> {
/** /**
* *
* @param iInvoices * @param iInvoices List<SSInvoice>
* @return * @return SSInvoiceTableModel
*/ */
public static SSInvoiceTableModel getDropDownModel(List<SSInvoice> iInvoices) { public static SSInvoiceTableModel getDropDownModel(List<SSInvoice> iInvoices) {
SSInvoiceTableModel iModel = new SSInvoiceTableModel(iInvoices); SSInvoiceTableModel iModel = new SSInvoiceTableModel(iInvoices);