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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Java CI with Maven

on:
push:
branches: [ "Kornelia" ]
pull_request:
branches: [ "Kornelia" ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml

#test
260 changes: 260 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,260 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [

{
"type": "java",
"name": "Current File",
"request": "launch",
"mainClass": "${file}"
},
{
"type": "java",
"name": "CIELABColorSpace",
"request": "launch",
"mainClass": "org.jhotdraw.color.CIELABColorSpace",
"projectName": "jhotdraw-gui"
},
{
"type": "java",
"name": "CIELCHabColorSpace",
"request": "launch",
"mainClass": "org.jhotdraw.color.CIELCHabColorSpace",
"projectName": "jhotdraw-gui"
},
{
"type": "java",
"name": "EditCanvasPanel",
"request": "launch",
"mainClass": "org.jhotdraw.gui.action.EditCanvasPanel",
"projectName": "jhotdraw-gui"
},
{
"type": "java",
"name": "CIEXYChromaticityDiagram",
"request": "launch",
"mainClass": "org.jhotdraw.samples.color.CIEXYChromaticityDiagram",
"projectName": "jhotdraw-samples-mini"
},
{
"type": "java",
"name": "JMixer",
"request": "launch",
"mainClass": "org.jhotdraw.samples.color.JMixer",
"projectName": "jhotdraw-samples-mini"
},
{
"type": "java",
"name": "WheelsAndSlidersMain",
"request": "launch",
"mainClass": "org.jhotdraw.samples.color.WheelsAndSlidersMain",
"projectName": "jhotdraw-samples-mini"
},
{
"type": "java",
"name": "FontChooserMain",
"request": "launch",
"mainClass": "org.jhotdraw.samples.font.FontChooserMain",
"projectName": "jhotdraw-samples-mini"
},
{
"type": "java",
"name": "ActivityMonitorSample",
"request": "launch",
"mainClass": "org.jhotdraw.samples.mini.ActivityMonitorSample",
"projectName": "jhotdraw-samples-mini"
},
{
"type": "java",
"name": "AnimationSample",
"request": "launch",
"mainClass": "org.jhotdraw.samples.mini.AnimationSample",
"projectName": "jhotdraw-samples-mini"
},
{
"type": "java",
"name": "BezierDemo",
"request": "launch",
"mainClass": "org.jhotdraw.samples.mini.BezierDemo",
"projectName": "jhotdraw-samples-mini"
},
{
"type": "java",
"name": "ConnectingFiguresSample",
"request": "launch",
"mainClass": "org.jhotdraw.samples.mini.ConnectingFiguresSample",
"projectName": "jhotdraw-samples-mini"
},
{
"type": "java",
"name": "CreationToolSample",
"request": "launch",
"mainClass": "org.jhotdraw.samples.mini.CreationToolSample",
"projectName": "jhotdraw-samples-mini"
},
{
"type": "java",
"name": "DefaultDOMStorableSample",
"request": "launch",
"mainClass": "org.jhotdraw.samples.mini.DefaultDOMStorableSample",
"projectName": "jhotdraw-samples-mini"
},
{
"type": "java",
"name": "DnDMultiEditorSample",
"request": "launch",
"mainClass": "org.jhotdraw.samples.mini.DnDMultiEditorSample",
"projectName": "jhotdraw-samples-mini"
},
{
"type": "java",
"name": "EditorSample",
"request": "launch",
"mainClass": "org.jhotdraw.samples.mini.EditorSample",
"projectName": "jhotdraw-samples-mini"
},
{
"type": "java",
"name": "FileIconsSample",
"request": "launch",
"mainClass": "org.jhotdraw.samples.mini.FileIconsSample",
"projectName": "jhotdraw-samples-mini"
},
{
"type": "java",
"name": "LabeledLineConnectionFigureSample",
"request": "launch",
"mainClass": "org.jhotdraw.samples.mini.LabeledLineConnectionFigureSample",
"projectName": "jhotdraw-samples-mini"
},
{
"type": "java",
"name": "LayouterSample",
"request": "launch",
"mainClass": "org.jhotdraw.samples.mini.LayouterSample",
"projectName": "jhotdraw-samples-mini"
},
{
"type": "java",
"name": "MovableChildFiguresSample",
"request": "launch",
"mainClass": "org.jhotdraw.samples.mini.MovableChildFiguresSample",
"projectName": "jhotdraw-samples-mini"
},
{
"type": "java",
"name": "MovableChildFiguresSampleWithAbstractDrawingView",
"request": "launch",
"mainClass": "org.jhotdraw.samples.mini.MovableChildFiguresSampleWithAbstractDrawingView",
"projectName": "jhotdraw-samples-mini"
},
{
"type": "java",
"name": "MovableChildFiguresSampleWithDelegatorDrawingView",
"request": "launch",
"mainClass": "org.jhotdraw.samples.mini.MovableChildFiguresSampleWithDelegatorDrawingView",
"projectName": "jhotdraw-samples-mini"
},
{
"type": "java",
"name": "MultiEditorSample",
"request": "launch",
"mainClass": "org.jhotdraw.samples.mini.MultiEditorSample",
"projectName": "jhotdraw-samples-mini"
},
{
"type": "java",
"name": "SVGDrawingPanelSample",
"request": "launch",
"mainClass": "org.jhotdraw.samples.mini.SVGDrawingPanelSample",
"projectName": "jhotdraw-samples-mini"
},
{
"type": "java",
"name": "SelectionToolSample",
"request": "launch",
"mainClass": "org.jhotdraw.samples.mini.SelectionToolSample",
"projectName": "jhotdraw-samples-mini"
},
{
"type": "java",
"name": "SmartConnectionFigureSample",
"request": "launch",
"mainClass": "org.jhotdraw.samples.mini.SmartConnectionFigureSample",
"projectName": "jhotdraw-samples-mini"
},
{
"type": "java",
"name": "Main",
"request": "launch",
"mainClass": "org.jhotdraw.samples.draw.Main",
"projectName": "jhotdraw-samples-misc"
},
{
"type": "java",
"name": "Main(1)",
"request": "launch",
"mainClass": "org.jhotdraw.samples.net.Main",
"projectName": "jhotdraw-samples-misc"
},
{
"type": "java",
"name": "NetApplet",
"request": "launch",
"mainClass": "org.jhotdraw.samples.net.NetApplet",
"projectName": "jhotdraw-samples-misc"
},
{
"type": "java",
"name": "Main(2)",
"request": "launch",
"mainClass": "org.jhotdraw.samples.odg.Main",
"projectName": "jhotdraw-samples-misc"
},
{
"type": "java",
"name": "Main(3)",
"request": "launch",
"mainClass": "org.jhotdraw.samples.pert.Main",
"projectName": "jhotdraw-samples-misc"
},
{
"type": "java",
"name": "PertApplet",
"request": "launch",
"mainClass": "org.jhotdraw.samples.pert.PertApplet",
"projectName": "jhotdraw-samples-misc"
},
{
"type": "java",
"name": "Main(4)",
"request": "launch",
"mainClass": "org.jhotdraw.samples.svg.Main",
"projectName": "jhotdraw-samples-misc"
},
{
"type": "java",
"name": "SVGApplet",
"request": "launch",
"mainClass": "org.jhotdraw.samples.svg.SVGApplet",
"projectName": "jhotdraw-samples-misc"
},
{
"type": "java",
"name": "Main(5)",
"request": "launch",
"mainClass": "org.jhotdraw.samples.teddy.Main",
"projectName": "jhotdraw-samples-misc"
},
{
"type": "java",
"name": "Bezier",
"request": "launch",
"mainClass": "org.jhotdraw.geom.Bezier",
"projectName": "jhotdraw-utils"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,17 @@ public class UndoAction extends AbstractViewAction {
private static final long serialVersionUID = 1L;
public static final String ID = "edit.undo";
private ResourceBundleUtil labels = ResourceBundleUtil.getBundle("org.jhotdraw.action.Labels");
private PropertyChangeListener redoActionPropertyListener = new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
String name = evt.getPropertyName();
if ((name == null && AbstractAction.NAME == null) || (name != null && name.equals(AbstractAction.NAME))) {
putValue(AbstractAction.NAME, evt.getNewValue());
} else if ("enabled".equals(name)) {
updateEnabledState();
}
private transient PropertyChangeListener redoActionPropertyListener = evt -> {
String name = evt.getPropertyName();

if ((name == null && AbstractAction.NAME == null)
|| (name != null && name.equals(AbstractAction.NAME))) {

putValue(AbstractAction.NAME, evt.getNewValue());

} else if ("enabled".equals(name)) {

updateEnabledState();
}
};

Expand Down
43 changes: 43 additions & 0 deletions jhotdraw-utils/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,48 @@
<version>6.8.21</version>
<scope>test</scope>
</dependency>
<!-- JUnit 4 -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
<!-- JGiven JUnit4 -->
<dependency>
<groupId>com.tngtech.jgiven</groupId>
<artifactId>jgiven-junit</artifactId>
<version>1.3.1</version>
<scope>test</scope>
</dependency>

<!-- AssertJ core -->
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.25.3</version>
<scope>test</scope>
</dependency>


</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.tngtech.jgiven</groupId>
<artifactId>jgiven-maven-plugin</artifactId>
<version>1.3.1</version>
<executions>
<execution>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
<configuration>
<format>html</format>
</configuration>
</plugin>
</plugins>
</build>
</project>
Loading