Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.0.4 snapshot #86

Merged
merged 20 commits into from
Mar 24, 2021
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
2f13b82
Update version in POMs.
bpangburn Feb 23, 2021
a8734e0
Use DEBUG level by default for demo.
bpangburn Feb 26, 2021
938f536
dataNavigator.updatePresentRow() only if navigating.
bpangburn Feb 26, 2021
3e78ac1
Update combo navigator if Part Name changes.
bpangburn Feb 26, 2021
041433c
If updateOption of current selection, re-select
errael Feb 28, 2021
7f863a8
Merge pull request #84 from bpangburn/UpdateOption_Reselect
bpangburn Mar 1, 2021
08f912e
Updates related to SSDBComboBox.updateOption() Issue (#85).
bpangburn Mar 1, 2021
7ac7db1
Updated plugin versions.
bpangburn Mar 16, 2021
666f8be
Added explicit Maven plugins versions to eliminate warnings.
bpangburn Mar 16, 2021
47d6db6
Initial fix for Issue #46 moving updateSSComponent out of SSCombos.
bpangburn Mar 18, 2021
60817a0
Added initial fix for Issue #46 to changelog.
bpangburn Mar 18, 2021
a50bcf3
Minimize unchecked scope. Avoid StringBuilder in logging
errael Mar 18, 2021
734b2e1
Merge pull request #87 from bpangburn/UncheckedAndLogging
bpangburn Mar 19, 2021
f0d6610
Fix/restore java-9-plus POM comment.
bpangburn Mar 19, 2021
c3c3943
Merge branch '4.0.4-SNAPSHOT' of https://github.com/bpangburn/swingse…
bpangburn Mar 19, 2021
047df93
Updated getObjectToSet method to use Date.valueOf for converting string
Mar 19, 2021
a999f03
Merge branch '4.0.4-SNAPSHOT' of https://github.com/bpangburn/swingse…
Mar 19, 2021
5606dc5
SSTableKeyAdapter - https://github.com/bpangburn/swingset/issues/89
bpangburn Mar 19, 2021
1fa7916
Minor formatting changes.
bpangburn Mar 19, 2021
6413a99
Updated CHANGELOG and some JavaDoc in SSDBComboBox.updateOption()
bpangburn Mar 24, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 34 additions & 10 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.3</version>
<version>4.0.4-SNAPSHOT</version>
<packaging>pom</packaging>

<name>swingset-parent</name>
Expand All @@ -19,6 +19,10 @@
<version.java>1.8</version.java>

<version.maven-enforcer-plugin>3.0.0-M3</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-install-plugin>3.0.0-M1</version.maven-install-plugin>
<version.maven-site-plugin>3.9.1</version.maven-site-plugin>
</properties>

<build>
Expand All @@ -35,18 +39,17 @@
</goals>
<configuration>
<rules>
<bannedPlugins>
<!-- will only display a warning but does not fail the build. -->
<level>WARN</level>
<excludes>
<exclude>org.apache.maven.plugins:maven-verifier-plugin</exclude>
</excludes>
<message>Please consider using the maven-invoker-plugin
(http://maven.apache.org/plugins/maven-invoker-plugin/)!</message>
</bannedPlugins>
<requirePluginVersions>
<message>Best Practice is to always define plugin versions!</message>
<banLatest>true</banLatest>
<banRelease>true</banRelease>
<banSnapshots>true</banSnapshots>
</requirePluginVersions>

<requireMavenVersion>
<version>${version.maven}</version>
</requireMavenVersion>

<requireJavaVersion>
<version>${version.java}</version>
</requireJavaVersion>
Expand All @@ -55,6 +58,27 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>${version.maven-clean-plugin}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>${version.maven-deploy-plugin}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>${version.maven-install-plugin}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>${version.maven-site-plugin}</version>
</plugin>
</plugins>
</build>

Expand Down
67 changes: 55 additions & 12 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.3</version>
<version>4.0.4-SNAPSHOT</version>
<packaging>jar</packaging>

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

<version.log4j>2.14.0</version.log4j>
<version.swingset>4.0.3</version.swingset>
<version.log4j>2.14.1</version.log4j>
<version.swingset>4.0.4-SNAPSHOT</version.swingset>
<version.h2>1.4.200</version.h2>
<version.java-getopt>1.0.13</version.java-getopt>

<version.maven-enforcer-plugin>3.0.0-M3</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-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-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.1.1</version.dependency-check-maven>
<version.maven-source-plugin>3.2.1</version.maven-source-plugin>
Expand Down Expand Up @@ -108,18 +116,17 @@
</goals>
<configuration>
<rules>
<bannedPlugins>
<!-- will only display a warning but does not fail the build. -->
<level>WARN</level>
<excludes>
<exclude>org.apache.maven.plugins:maven-verifier-plugin</exclude>
</excludes>
<message>Please consider using the maven-invoker-plugin
(http://maven.apache.org/plugins/maven-invoker-plugin/)!</message>
</bannedPlugins>
<requirePluginVersions>
<message>Best Practice is to always define plugin versions!</message>
<banLatest>true</banLatest>
<banRelease>true</banRelease>
<banSnapshots>true</banSnapshots>
</requirePluginVersions>

<requireMavenVersion>
<version>${version.maven}</version>
</requireMavenVersion>

<requireJavaVersion>
<version>${version.java}</version>
</requireJavaVersion>
Expand All @@ -128,6 +135,42 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>${version.maven-clean-plugin}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>${version.maven-deploy-plugin}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>${version.maven-install-plugin}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${version.maven-jar-plugin}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>${version.maven-resources-plugin}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>${version.maven-site-plugin}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${version.maven-surefire-plugin}</version>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,16 @@
import java.awt.Container;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.event.FocusAdapter;
import java.awt.event.FocusEvent;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Arrays;

import javax.swing.JLabel;
import javax.swing.JMenuBar;
import javax.swing.JOptionPane;
import javax.swing.SwingUtilities;
import javax.swing.plaf.InternalFrameUI;
import javax.swing.plaf.basic.BasicInternalFrameUI;

Expand Down Expand Up @@ -179,9 +182,27 @@ protected void addComponents() throws Exception {
contentPane.add(getDataNavigator(), constraints);
}

/** {@inheritDoc} */
@Override
protected void addCustomListeners() throws Exception {
// nothing to do..
protected void addCustomListeners() {

txtPartName.addFocusListener(new FocusAdapter() {
String oldValue = new String("");

@Override
public void focusGained(FocusEvent fe) {
oldValue = txtPartName.getText();
}

@Override
public void focusLost(FocusEvent fe) {
if (!txtPartName.getText().equals(oldValue)) {
logger.debug("txtPartName triggering update to combo navigator.");
SwingUtilities.invokeLater(() -> updateNavigatorText());
}
}

});
}

@Override// /**
Expand Down Expand Up @@ -291,4 +312,38 @@ public void setUI(InternalFrameUI _ui) {
protected void updateSSDBComboBoxes() {
// nothing to do...
}

/**
* Updates the Combo Navigator based on the current screen values - used after
* editing a component field
*/
private void updateNavigatorText() {

try {
if (getRowset().getRow() > 0) {

long partID = getRowset().getLong("part_id");

getSyncManager().async();

final String update = txtPartName.getText();

// logger.debug("Running on EDT? " + SwingUtilities.isEventDispatchThread());
// logger.debug("Attempting to update combo navigator Option to: " + update);

getComboNav().updateOption(partID, update);

// logger.debug("Combo navigator Option after call to getComboNav().updateOption(): " + getComboNav().getSelectedOption());

getSyncManager().sync();

}

} catch (SQLException _se) {
logger.error("Error occured updating Combo Navigator text.",_se);
JOptionPane.showMessageDialog(getRootFrame(),
"Error occured updating Combo Navigator text.\n" + _se.getMessage());
}

}
}
6 changes: 3 additions & 3 deletions swingset-demo/src/main/resources/log4j2.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="INFO">
<Configuration status="DEBUG">
<Appenders>
<Console name="ConsoleAppender" target="SYSTEM_OUT">
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36}.%M() - %msg%n" />
<PatternLayout pattern="%d{HH:mm:ss} [%t] %-5level %logger{36}.%M() - %msg%n" />
</Console>
<File name="FileAppender" fileName="./log/swingset-demo-${date:yyyyMMdd}.log" immediateFlush="false" append="true">
<PatternLayout pattern="%d{yyy-MM-dd HH:mm:ss.SSS} [%t] %-5level %logger{36}.%M() - %msg%n"/>
</File>
</Appenders>
<Loggers>
<Root level="warn">
<Root level="DEBUG">
<AppenderRef ref="ConsoleAppender" />
<AppenderRef ref="FileAppender"/>
</Root>
Expand Down
12 changes: 12 additions & 0 deletions swingset/CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@
ChangeLog file for the SwingSet Open Toolkit for Java Swing.
==============================================================================

==============================================================================
SwingSet 4.0.4 - Released TBD
==============================================================================

Changes:
1. SSBaseComboBox.updateOption(). Combo editor was not updating
consistently. See https://github.com/bpangburn/swingset/issues/85
2. Updated Log4j and JUnit Maven dependencies.
3. Added explicit Maven plugins versions to eliminate warnings.
4. Initial fix for Issue #46 moving updateSSComponent out of SSComboBox
and SSDBComboBox.

==============================================================================
SwingSet 4.0.3 - Released 2021-02-22
==============================================================================
Expand Down
Loading