mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
Next (#656)
* flatpak file updated * add sha generator * fix mail * remove mail * Mini Toggle Switch - lugs do not get rotated when changing orientation; rotate from the context menu doesn't work * Added 'SVG Image' component * Fixed the issue with Perf Board, Vero Board and TriPad Board sometimes rendering an extra row with pads when there's no space for them * release 4.18
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
<classpathentry kind="lib" path="lib/orsonpdf-1.8.jar"/>
|
||||
<classpathentry kind="lib" path="lib/gestures-wrapper-0.2.jar"/>
|
||||
<classpathentry kind="lib" path="lib/jar-loader.jar"/>
|
||||
<classpathentry kind="lib" path="lib/svgSalamander-1.1.2.4.jar"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/diylc-core"/>
|
||||
<classpathentry kind="lib" path="lib/xstream-1.4.3.jar"/>
|
||||
<classpathentry kind="lib" path="lib/java-http-proxy.jar"/>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<property name="jar.dir" value="${build.dir}/jar" />
|
||||
<property name="report.dir" value="${build.dir}/junitreport" />
|
||||
<property name="main.class" value="org.diylc.DIYLCStarter" />
|
||||
<property name="diylc.version" value="4.17.0" />
|
||||
<property name="diylc.version" value="4.18.0" />
|
||||
|
||||
<property name="osx.jre8.path" value="jre\osx\jdk8u275-b01-jre\Contents\Home\" />
|
||||
|
||||
@@ -163,6 +163,7 @@
|
||||
<zipfileset dir="flatpak" includes="com.diy_fever.DIYLayoutCreator.desktop" />
|
||||
<zipfileset dir="flatpak" includes="com.diy_fever.DIYLayoutCreator.metainfo.xml" />
|
||||
</zip>
|
||||
<checksum file="${build.dir}/diylc-${diylc.version}.zip" algorithm="SHA-256"/>
|
||||
</target>
|
||||
|
||||
<target name="full" depends="win,universal,mac" />
|
||||
|
||||
@@ -33,10 +33,31 @@
|
||||
<url type="donation">http://diy-fever.com/donate</url>
|
||||
<url type="help">https://github.com/bancika/diy-layout-creator/tree/wiki</url>
|
||||
<url type="faq">https://github.com/bancika/diy-layout-creator/blob/wiki/FAQ.md</url>
|
||||
<url type="contact">bancika_AT_gmail.com</url>
|
||||
<!--<url type="contact">mailto:bancika_AT_gmail.com</url>-->
|
||||
<update_contact>nbenitezl_AT_gmail.com</update_contact>
|
||||
<content_rating type="oars-1.1"/>
|
||||
<releases>
|
||||
<release version="4.18.0" date="2021-07-11">
|
||||
<description>
|
||||
<ul>
|
||||
<li>[New Feature] Added 'SVG Image' component, to allow importing vector graphics into projects</li>
|
||||
<li>[Bug Fix] Mini Toggle Switch - lugs do not get rotated when changing orientation; rotate from the context menu doesn't work</li>
|
||||
<li>[Bug Fix] Fixed the issue with Perf Board, Vero Board and TriPad Board sometimes rendering an extra row with pads when there's no space for them</li>
|
||||
</ul>
|
||||
</description>
|
||||
<url>https://github.com/bancika/diy-layout-creator/releases/tag/v4.18.0</url>
|
||||
</release>
|
||||
<release version="4.17.0" date="2021-02-14">
|
||||
<description>
|
||||
<ul>
|
||||
<li>[New Feature] Added 'Eurorack Stripboard' component, designed by David Haillant</li>
|
||||
<li>[New Feature] Allow multi-line text in label components</li>
|
||||
<li>[Improvement] Slightly fancier splash screen :)</li>
|
||||
<li>[Bug Fix] Fixed a major memory leak when using Undo functionality</li>
|
||||
</ul>
|
||||
</description>
|
||||
<url>https://github.com/bancika/diy-layout-creator/releases/tag/v4.17.0</url>
|
||||
</release>
|
||||
<release version="4.16.0" date="2021-01-17">
|
||||
<description>
|
||||
<ul>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -30,6 +30,7 @@ import javax.swing.JLabel;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.diylc.common.PropertyWrapper;
|
||||
import org.diylc.components.misc.LoadlineEntity;
|
||||
import org.diylc.core.annotations.ByteArrayProperty;
|
||||
import org.diylc.core.annotations.DynamicList;
|
||||
import org.diylc.core.annotations.MultiLineText;
|
||||
import org.diylc.core.measures.AbstractMeasure;
|
||||
@@ -77,8 +78,17 @@ public class FieldEditorFactory {
|
||||
MeasureArrayEditor editor = new MeasureArrayEditor(property);
|
||||
return editor;
|
||||
}
|
||||
if (byte[].class.isAssignableFrom(property.getType())) {
|
||||
ImageEditor editor = new ImageEditor(property);
|
||||
if (byte[].class.isAssignableFrom(property.getType())) {
|
||||
ByteArrayProperty annotation = null;
|
||||
try {
|
||||
property.getGetter().isAnnotationPresent(ByteArrayProperty.class);
|
||||
annotation = property.getGetter().getAnnotation(ByteArrayProperty.class);
|
||||
} catch (SecurityException e) {
|
||||
LOG.error("Error while reading ByteArrayProperty annotation", e);
|
||||
} catch (NoSuchMethodException e) {
|
||||
LOG.error("Error while reading ByteArrayProperty annotation", e);
|
||||
}
|
||||
ImageEditor editor = new ImageEditor(property, annotation == null ? null : annotation.binaryType());
|
||||
return editor;
|
||||
}
|
||||
if (property.getType().isEnum()) {
|
||||
|
||||
@@ -27,6 +27,7 @@ import javax.swing.JButton;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.poi.util.IOUtils;
|
||||
import org.diylc.common.PropertyWrapper;
|
||||
import org.diylc.core.annotations.BinaryType;
|
||||
import org.diylc.swing.gui.DialogFactory;
|
||||
import org.diylc.swing.plugins.file.FileFilterEnum;
|
||||
|
||||
@@ -38,16 +39,19 @@ public class ImageEditor extends JButton {
|
||||
|
||||
private static final String title = "Click to load image file";
|
||||
|
||||
public ImageEditor(final PropertyWrapper property) {
|
||||
private BinaryType binaryType;
|
||||
|
||||
public ImageEditor(final PropertyWrapper property, BinaryType binaryType) {
|
||||
super(property.isUnique() ? title : ("(multi value) " + title));
|
||||
this.binaryType = binaryType;
|
||||
if (property.isReadOnly())
|
||||
setEnabled(false);
|
||||
addActionListener(new ActionListener() {
|
||||
|
||||
@Override
|
||||
public void actionPerformed(java.awt.event.ActionEvent e) {
|
||||
File file = DialogFactory.getInstance().showOpenDialog(FileFilterEnum.IMAGES.getFilter(),
|
||||
null, FileFilterEnum.IMAGES.getExtensions()[0], null);
|
||||
File file = DialogFactory.getInstance().showOpenDialog(getFileFilterEnum().getFilter(),
|
||||
null, getFileFilterEnum().getExtensions()[0], null);
|
||||
if (file != null) {
|
||||
property.setChanged(true);
|
||||
FileInputStream fis;
|
||||
@@ -63,6 +67,13 @@ public class ImageEditor extends JButton {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private FileFilterEnum getFileFilterEnum() {
|
||||
if (binaryType == BinaryType.SVG) {
|
||||
return FileFilterEnum.SVG;
|
||||
}
|
||||
return FileFilterEnum.IMAGES;
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public void setBackground(Color bg) {
|
||||
|
||||
@@ -30,7 +30,7 @@ public enum FileFilterEnum {
|
||||
PNG("PNG Images (*.png)", "png"), PDF("PDF Files (*.pdf)", "pdf"), DIY("DIY Project Files (*.diy)", "diy"), EXCEL(
|
||||
"Excel Workbooks (*.xls)", "xls"), CSV("Comma Separated Files (*.csv)", "csv"), HTML("HTML Files (*.html)",
|
||||
"html"), IMAGES("Image Files (*.png, *.jpg, *.gif)", "png", "jpg", "gif"), XML("XML Files (*.xml)", "xml"),
|
||||
TEST("Test Files (*.tst)", "tst"), CRV("Curve Files (*.crv)", "crv");
|
||||
TEST("Test Files (*.tst)", "tst"), CRV("Curve Files (*.crv)", "crv"), SVG("SVG Files (*.svg)", "svg");
|
||||
|
||||
FileFilter filter;
|
||||
String[] extensions;
|
||||
|
||||
Reference in New Issue
Block a user