Skip to content

Commit

Permalink
Merge pull request #125 from bpangburn/4.0.9-SNAPSHOTV2
Browse files Browse the repository at this point in the history
merging 4.0.9-SNAPSHOTV2 into master for 4.0.9. release
  • Loading branch information
bpangburn authored Mar 16, 2022
2 parents 76ed80f + 329ecf8 commit 359b768
Show file tree
Hide file tree
Showing 41 changed files with 670 additions and 305 deletions.
15 changes: 11 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.nqadmin.swingset</groupId>
<artifactId>swingset-parent</artifactId>
<version>4.0.8</version>
<version>4.0.9</version>
<packaging>pom</packaging>

<name>swingset-parent</name>
Expand All @@ -18,15 +18,23 @@
<version.maven>3.6.3</version.maven>
<version.java>1.8</version.java>

<!-- Shared by swingset-parent, swingset, and swingset-demo -->
<version.versions-maven-plugin>2.10.0</version.versions-maven-plugin>
<version.maven-enforcer-plugin>3.0.0</version.maven-enforcer-plugin>
<version.maven-clean-plugin>3.1.0</version.maven-clean-plugin>
<version.maven-deploy-plugin>3.0.0-M1</version.maven-deploy-plugin>
<version.maven-deploy-plugin>3.0.0-M2</version.maven-deploy-plugin>
<version.maven-install-plugin>3.0.0-M1</version.maven-install-plugin>
<version.maven-site-plugin>3.9.1</version.maven-site-plugin>
<version.maven-site-plugin>3.11.0</version.maven-site-plugin>
</properties>

<build>
<plugins>
<!-- https://mvnrepository.com/artifact/org.codehaus.mojo/versions-maven-plugin -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>${version.versions-maven-plugin}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
Expand Down Expand Up @@ -58,7 +66,6 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
Expand Down
33 changes: 22 additions & 11 deletions swingset-demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<groupId>com.nqadmin.swingset.demo</groupId>
<artifactId>swingset-demo</artifactId>
<version>4.0.8</version>
<version>4.0.9</version>
<packaging>jar</packaging>

<name>swingset-demo</name>
Expand All @@ -21,25 +21,31 @@
<version.maven>3.6.3</version.maven>
<version.java>1.8</version.java>

<version.log4j>2.17.1</version.log4j>
<version.swingset>4.0.8</version.swingset>
<!-- primary swingset-demo dependencies -->
<version.swingset>4.0.9</version.swingset>
<version.log4j>2.17.2</version.log4j>
<version.h2>2.1.210</version.h2>
<version.java-getopt>1.0.13</version.java-getopt>

<!-- Shared by swingset-parent, swingset, and swingset-demo -->
<version.versions-maven-plugin>2.10.0</version.versions-maven-plugin>
<version.maven-enforcer-plugin>3.0.0</version.maven-enforcer-plugin>
<version.maven-clean-plugin>3.1.0</version.maven-clean-plugin>
<version.maven-deploy-plugin>3.0.0-M1</version.maven-deploy-plugin>
<version.maven-deploy-plugin>3.0.0-M2</version.maven-deploy-plugin>
<version.maven-install-plugin>3.0.0-M1</version.maven-install-plugin>
<version.maven-jar-plugin>3.2.0</version.maven-jar-plugin>
<version.maven-site-plugin>3.11.0</version.maven-site-plugin>

<!-- Shared by swingset and swingset-demo -->
<version.maven-jar-plugin>3.2.2</version.maven-jar-plugin>
<version.maven-resources-plugin>3.2.0</version.maven-resources-plugin>
<version.maven-site-plugin>3.9.1</version.maven-site-plugin>
<version.maven-compiler-plugin>3.10.1</version.maven-compiler-plugin>
<version.dependency-check-maven>7.0.0</version.dependency-check-maven>
<version.maven-gpg-plugin>3.0.1</version.maven-gpg-plugin>
<version.maven-surefire-plugin>3.0.0-M5</version.maven-surefire-plugin>

<version.maven-compiler-plugin>3.8.1</version.maven-compiler-plugin>
<version.dependency-check-maven>6.5.3</version.dependency-check-maven>
<version.maven-source-plugin>3.2.1</version.maven-source-plugin>

<!-- swingset-demo-only -->
<version.maven-assembly-plugin>3.3.0</version.maven-assembly-plugin>
<version.maven-gpg-plugin>3.0.1</version.maven-gpg-plugin>
</properties>

<licenses>
Expand Down Expand Up @@ -103,6 +109,12 @@

<build>
<plugins>
<!-- https://mvnrepository.com/artifact/org.codehaus.mojo/versions-maven-plugin -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>${version.versions-maven-plugin}</version>
</plugin>
<!-- Maven Enforcer forces specified version of Java and Maven -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -135,7 +147,6 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@
import java.sql.SQLException;

import javax.sql.RowSet;
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.KeyStroke;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
Expand All @@ -58,6 +60,8 @@
import com.nqadmin.swingset.SSDataNavigator;
import com.nqadmin.swingset.SSTextField;
import com.nqadmin.swingset.utils.SSSyncManager;
import javax.swing.Action;
import javax.swing.JButton;

/**
* This example displays data from the part_data table.
Expand Down Expand Up @@ -340,6 +344,45 @@ public void performRefreshOps() {
constraints.gridwidth = 2;
contentPane.add(navigator, constraints);

constraints.gridy = 7;
constraints.gridwidth = 1;

// Illustrate use of InputMap/ActionMap for custom key and extra button handling.
// Setup F3-F11 mnemonics to correspond to the buttons on Navigator.
// There are also two new buttons below the Navigator (extra first and last)
//
// The actions here are currently the only Actions available in the SSDataNavigator
// ActionMap.
//
// See https://docs.oracle.com/javase/tutorial/uiswing/misc/action.html

// Hotkeys/mnemonics
navigator.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("F3"),"NavFirst");
navigator.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("F4"),"NavPrevious");
navigator.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("F5"),"NavNext");
navigator.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("F6"),"NavLast");
navigator.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("F7"),"NavCommit");
navigator.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("F8"),"NavUndo");
navigator.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("F9"),"NavRefresh");
navigator.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("F10"),"NavAdd");
navigator.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("F11"),"NavDelete");

// "Extra" buttons
Action tmpAction;
JButton tmpButton;

// First record
tmpAction = navigator.getActionMap().get("NavFirst");
tmpButton = new JButton(tmpAction);
constraints.gridx = 0;
contentPane.add(tmpButton, constraints);

// Last record
tmpAction = navigator.getActionMap().get("NavLast");
tmpButton = new JButton(tmpAction);
constraints.gridx = 1;
contentPane.add(tmpButton, constraints);

// DISABLE THE PRIMARY KEY
txtPartID.setEnabled(false);

Expand Down
33 changes: 33 additions & 0 deletions swingset/CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,39 @@
ChangeLog file for the SwingSet Open Toolkit for Java Swing.
==============================================================================

==============================================================================
SwingSet 4.0.9 - Released 2022-03-16
==============================================================================

Changes:
1. Add SSComponentInterface.getSSDataNavigator() to allow all components
to access the data navigator. Is it deprecated as we think there should
generally NOT be a need to access the data navigator now that screens
can add their own mnemonic/hotkeys that can/will work regardless of
which field has the focus. See next item.
2. Addition of Actions for SSDataNavigator buttons. Allow for easy
implementation of mnemonic/hotkeys using an InputMap. See:
https://github.com/bpangburn/swingset/pull/124
3. Work around for Log4j LogManager.getLogger() issue with NetBeans
GUI builder. See:
https://github.com/bpangburn/swingset/pull/123
https://issues.apache.org/jira/browse/LOG4J2-3420
https://lists.apache.org/thread/sp2ngsp0qmhptvts2rwhprqfrb7f0bpl
https://lists.apache.org/thread/plkhc38f5g7cxgv6p53hg5s1k9x3mrvt
https://github.com/bpangburn/swingset/discussions/93#discussioncomment-2258596
4. Minor code cleanup to eliminate some Eclipse warnings.
5. SSDataGrid container bug. See:
https://github.com/bpangburn/swingset/issues/121.
6. Updated Dependency Check Maven Plugin to 7.0.0.
7. Updated Log4j to 2.17.2.
8. Added variable and updated Versions Maven Plugin to 2.10.0,
9. Updated Maven Deploy Plugin to 3.0.0-M2.
10.Updated Maven Site Plugin to 3.11.0.
11.Updated Maven Compiler Plugin to 3.10.1.
12.Updated Maven JAR Plugin to 3.2.2.
13.Updated Maven JavaDoc Plugin to 3.3.2.
14.Updated Nexus Staging Maven Plugin to 1.6.12.

==============================================================================
SwingSet 4.0.8 - Released 2022-02-10
==============================================================================
Expand Down
46 changes: 32 additions & 14 deletions swingset/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<groupId>com.nqadmin.swingset</groupId>
<artifactId>swingset</artifactId>
<version>4.0.8</version>
<version>4.0.9</version>
<packaging>jar</packaging>

<name>swingset</name>
Expand All @@ -21,26 +21,32 @@
<version.maven>3.6.3</version.maven>
<version.java>1.8</version.java>

<!-- primary swingset dependencies -->
<!--<version.glazedlists>1.11.0</version.glazedlists> -->
<version.glazedlists>1.11.1203</version.glazedlists>
<version.log4j>2.17.1</version.log4j>
<version.log4j>2.17.2</version.log4j>
<version.jdbcrowsetimpl>1.0.3</version.jdbcrowsetimpl>

<!-- Shared by swingset-parent, swingset, and swingset-demo -->
<version.versions-maven-plugin>2.10.0</version.versions-maven-plugin>
<version.maven-enforcer-plugin>3.0.0</version.maven-enforcer-plugin>
<version.maven-clean-plugin>3.1.0</version.maven-clean-plugin>
<version.maven-deploy-plugin>3.0.0-M1</version.maven-deploy-plugin>
<version.maven-deploy-plugin>3.0.0-M2</version.maven-deploy-plugin>
<version.maven-install-plugin>3.0.0-M1</version.maven-install-plugin>
<version.maven-jar-plugin>3.2.0</version.maven-jar-plugin>
<version.maven-resources-plugin>3.2.0</version.maven-resources-plugin>
<version.maven-site-plugin>3.9.1</version.maven-site-plugin>
<version.maven-site-plugin>3.11.0</version.maven-site-plugin>

<version.maven-compiler-plugin>3.8.1</version.maven-compiler-plugin>
<version.dependency-check-maven>6.5.3</version.dependency-check-maven>
<version.maven-source-plugin>3.2.1</version.maven-source-plugin>
<version.maven-javadoc-plugin>3.3.1</version.maven-javadoc-plugin>
<!-- Shared by swingset and swingset-demo -->
<version.maven-jar-plugin>3.2.2</version.maven-jar-plugin>
<version.maven-resources-plugin>3.2.0</version.maven-resources-plugin>
<version.maven-compiler-plugin>3.10.1</version.maven-compiler-plugin>
<version.dependency-check-maven>7.0.0</version.dependency-check-maven>
<version.maven-gpg-plugin>3.0.1</version.maven-gpg-plugin>
<version.nexus-staging-maven-plugin>1.6.8</version.nexus-staging-maven-plugin>
<version.maven-surefire-plugin>3.0.0-M5</version.maven-surefire-plugin>
<version.maven-source-plugin>3.2.1</version.maven-source-plugin>

<!-- swingset-only -->
<version.maven-javadoc-plugin>3.3.2</version.maven-javadoc-plugin>
<version.nexus-staging-maven-plugin>1.6.12</version.nexus-staging-maven-plugin>
<version.maven-failsafe-plugin>3.0.0-M5</version.maven-failsafe-plugin>
<version.junit-jupiter-any>5.8.2</version.junit-jupiter-any>
</properties>
Expand Down Expand Up @@ -97,9 +103,16 @@
</repositories>

<dependencies>
<!-- MAIN GLAZED LIST ARTIFACT - CURRENTLY DISABLED AWAITING NEXT RELEASE FEATURES:
https://github.com/glazedlists/glazedlists -->
<!-- https://mvnrepository.com/artifact/com.glazedlists/glazedlists -->
<!-- <dependency> <groupId>com.glazedlists</groupId> <artifactId>glazedlists</artifactId>
<version>${version.glazedlists}</version> </dependency> -->
<!--
<dependency>
<groupId>com.glazedlists</groupId>
<artifactId>glazedlists</artifactId>
<version>${version.glazedlists}</version>
</dependency>
-->

<!-- ERNIE RAEL'S CUSTOM GLAZEDLIST ARTIFACT -->
<!-- https://mvnrepository.com/artifact/com.raelity.3rdparty.com.glazedlists -->
Expand Down Expand Up @@ -159,6 +172,12 @@

<build>
<plugins>
<!-- https://mvnrepository.com/artifact/org.codehaus.mojo/versions-maven-plugin -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>${version.versions-maven-plugin}</version>
</plugin>
<!-- Maven Enforcer forces specified version of Java and Maven -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -191,7 +210,6 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
import javax.swing.JComboBox;
import javax.swing.JOptionPane;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import com.nqadmin.swingset.models.AbstractComboBoxListSwingModel;
Expand All @@ -65,6 +64,7 @@
import com.nqadmin.swingset.models.SSListItem;
import com.nqadmin.swingset.utils.SSCommon;
import com.nqadmin.swingset.utils.SSComponentInterface;
import com.nqadmin.swingset.utils.SSUtils;

import ca.odell.glazedlists.BasicEventList;
import ca.odell.glazedlists.matchers.TextMatcherEditor;
Expand Down Expand Up @@ -305,7 +305,7 @@ protected BaseGlazedModel() {
/**
* Log4j Logger for component
*/
private static final Logger logger = LogManager.getLogger();
private static final Logger logger = SSUtils.getLogger();

/**
* When {@link #getAllowNull() } is true, this is the null item;
Expand Down Expand Up @@ -938,6 +938,7 @@ protected boolean isComboBoxNavigator() {
* database.
* @return true if combo box can have null value
*/
@Override
public boolean getAllowNull() {
return !isComboBoxNavigator() && getSSCommon().getAllowNull();
}
Expand Down
4 changes: 2 additions & 2 deletions swingset/src/main/java/com/nqadmin/swingset/SSCheckBox.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@
import javax.sql.RowSet;
import javax.swing.JCheckBox;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import com.nqadmin.swingset.utils.SSCommon;
import com.nqadmin.swingset.utils.SSComponentInterface;
import com.nqadmin.swingset.utils.SSUtils;

// SSCheckBox.java
//
Expand Down Expand Up @@ -140,7 +140,7 @@ public void itemStateChanged(final ItemEvent ie) {
/**
* Log4j Logger for component
*/
private static Logger logger = LogManager.getLogger();
private static Logger logger = SSUtils.getLogger();

/**
* unique serial id
Expand Down
4 changes: 2 additions & 2 deletions swingset/src/main/java/com/nqadmin/swingset/SSComboBox.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@

import javax.swing.JComboBox;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import com.nqadmin.swingset.models.SSListItem;
import com.nqadmin.swingset.utils.SSUtils;


// SSComboBox.java
Expand Down Expand Up @@ -254,7 +254,7 @@ protected SSListItem createNullItem(Model.Remodel remodel) {
* Log4j Logger for component
*/
@SuppressWarnings("unused")
private static Logger logger = LogManager.getLogger();
private static Logger logger = SSUtils.getLogger();

/**
* Value to represent that no item has been selected in the combo box.
Expand Down
Loading

0 comments on commit 359b768

Please sign in to comment.