mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
4.6.0 release
This commit is contained in:
@@ -3039,7 +3039,7 @@
|
||||
<minor>6</minor>
|
||||
<build>0</build>
|
||||
</versionNumber>
|
||||
<releaseDate>2020-04-20 00:00:00.000 CET</releaseDate>
|
||||
<releaseDate>2020-05-03 00:00:00.000 CET</releaseDate>
|
||||
<name></name>
|
||||
<changes>
|
||||
<org.diylc.appframework.update.Change>
|
||||
@@ -3050,6 +3050,10 @@
|
||||
<changeType>NEW_FEATURE</changeType>
|
||||
<description>Added "Sizing Mode" to Image component that allows stretching the image freely using two control points</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>NEW_FEATURE</changeType>
|
||||
<description>Added "Loadline Editor" to the File menu, to be used in the future to calculate tube or transistor bias point using loadlines</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>IMPROVEMENT</changeType>
|
||||
<description>Include themes and fonts in OSX app package</description>
|
||||
|
||||
Binary file not shown.
@@ -36,10 +36,10 @@ import org.diylc.core.annotations.BomPolicy;
|
||||
import org.diylc.core.annotations.ComponentDescriptor;
|
||||
import org.diylc.core.annotations.EditableProperty;
|
||||
|
||||
@ComponentDescriptor(name = "Loadline", category = "Misc", author = "Branislav Stojkovic",
|
||||
zOrder = IDIYComponent.BOARD, instanceNamePrefix = "LL",
|
||||
description = "Loadline of a tube or transistor", bomPolicy = BomPolicy.SHOW_ONLY_TYPE_NAME,
|
||||
autoEdit = false, transformer = SimpleComponentTransformer.class)
|
||||
//@ComponentDescriptor(name = "Loadline", category = "Misc", author = "Branislav Stojkovic",
|
||||
// zOrder = IDIYComponent.BOARD, instanceNamePrefix = "LL",
|
||||
// description = "Loadline of a tube or transistor", bomPolicy = BomPolicy.SHOW_ONLY_TYPE_NAME,
|
||||
// autoEdit = false, transformer = SimpleComponentTransformer.class)
|
||||
public class Loadline extends AbstractBoard {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@@ -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.5.0" />
|
||||
<property name="diylc.version" value="4.6.0" />
|
||||
|
||||
<property name="classes.dir" value="${build.dir}/temp/${ant.project.name}/classes" />
|
||||
<property name="test.classes.dir" value="${build.dir}/temp/${ant.project.name}/test.classes" />
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -66,7 +66,7 @@ public enum IconLoader {
|
||||
Node("node.png"), Web("web.png"), Guitar("guitar.png"), Scientist("scientist.png"), StarGrey("star_grey.png"), StarBlue("star_blue.png"),
|
||||
JarBeanInto("jar_bean_into.png"), GraphEdgeDirected("graph_edge_directed.png"), LaserPointer("laserpointer.png"), TapeMeasure("tape_measure1.png"),
|
||||
Elements("elements1.png"), GraphNodes("graph_nodes.png"), User("user1.png"), FlexibleLeads("flexible_leads.png"), Pads("pads.png"), Lock("lock.png"),
|
||||
Unlock("lock_open.png"), Earth("earth.png");
|
||||
Unlock("lock_open.png"), Earth("earth.png"), Loadline("loadline.png"), LoadlineAdd("loadline_add.png");
|
||||
|
||||
protected String name;
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 629 B |
Binary file not shown.
|
After Width: | Height: | Size: 648 B |
@@ -104,6 +104,16 @@ public class DialogFactory {
|
||||
|
||||
return processFileChooserResult(result, openFileChooser, defaultExtension);
|
||||
}
|
||||
|
||||
public File showOpenDialog(Window owner, FileFilter fileFilter, File initialFile, String defaultExtension,
|
||||
IFileChooserAccessory accessory) {
|
||||
JFileChooser openFileChooser = new JFileChooser();
|
||||
initializeFileChooser(openFileChooser, fileFilter, initialFile, defaultExtension, accessory, false);
|
||||
|
||||
int result = openFileChooser.showOpenDialog(owner);
|
||||
|
||||
return processFileChooserResult(result, openFileChooser, defaultExtension);
|
||||
}
|
||||
|
||||
public File showOpenDialog(FileFilter fileFilter, File initialFile, String defaultExtension,
|
||||
IFileChooserAccessory accessory, JFrame ownerFrame) {
|
||||
|
||||
@@ -23,12 +23,14 @@ import java.util.Set;
|
||||
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.Action;
|
||||
import javax.swing.BorderFactory;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JTextField;
|
||||
import javax.swing.UIManager;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.poi.util.IOUtils;
|
||||
@@ -97,6 +99,8 @@ public class LoadlineEditorFrame extends JFrame implements IView {
|
||||
|
||||
public LoadlineEditorFrame() {
|
||||
super("Loadline Editor");
|
||||
setIconImage(IconLoader.Loadline.getImage());
|
||||
setResizable(false);
|
||||
|
||||
if (loadline == null) {
|
||||
loadline = new LoadlineEntity();
|
||||
@@ -174,6 +178,7 @@ public class LoadlineEditorFrame extends JFrame implements IView {
|
||||
toolbar.add(new JButton(new SaveAction()));
|
||||
toolbar.add(new JButton(new LoadImageAction()));
|
||||
toolbar.add(new JButton(new AddCurveAction()));
|
||||
toolbar.setBorder(BorderFactory.createMatteBorder(1, 0, 1, 0, UIManager.getColor("InternalFrame.borderShadow")));
|
||||
}
|
||||
return toolbar;
|
||||
}
|
||||
@@ -265,6 +270,7 @@ public class LoadlineEditorFrame extends JFrame implements IView {
|
||||
JButton updateButton = new JButton(new UpdateValuesAction());
|
||||
controlPanel.add(updateButton);
|
||||
|
||||
controlPanel.setBorder(BorderFactory.createMatteBorder(1, 0, 0, 0, UIManager.getColor("InternalFrame.borderShadow")));
|
||||
}
|
||||
return controlPanel;
|
||||
}
|
||||
@@ -513,7 +519,7 @@ public class LoadlineEditorFrame extends JFrame implements IView {
|
||||
@Override
|
||||
public boolean editProperties(List<PropertyWrapper> properties,
|
||||
Set<PropertyWrapper> defaultedProperties) {
|
||||
PropertyEditorDialog editor = DialogFactory.getInstance().createPropertyEditorDialog(properties,
|
||||
PropertyEditorDialog editor = DialogFactory.getInstance().createPropertyEditorDialog(LoadlineEditorFrame.this, properties,
|
||||
LangUtil.translate("Edit Selection"), true);
|
||||
editor.setVisible(true);
|
||||
defaultedProperties.addAll(editor.getDefaultedProperties());
|
||||
@@ -599,7 +605,7 @@ public class LoadlineEditorFrame extends JFrame implements IView {
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
final File file = DialogFactory.getInstance().showOpenDialog(FileFilterEnum.CRV.getFilter(), null,
|
||||
final File file = DialogFactory.getInstance().showOpenDialog(LoadlineEditorFrame.this, FileFilterEnum.CRV.getFilter(), null,
|
||||
FileFilterEnum.CRV.getExtensions()[0], null);
|
||||
if (file != null) {
|
||||
try {
|
||||
@@ -643,7 +649,7 @@ public class LoadlineEditorFrame extends JFrame implements IView {
|
||||
public AddCurveAction() {
|
||||
super();
|
||||
putValue(Action.NAME, "Add a Curve");
|
||||
// putValue(Action.SMALL_ICON, IconLoader.DiskBlue.getIcon());
|
||||
putValue(Action.SMALL_ICON, IconLoader.LoadlineAdd.getIcon());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -664,7 +670,7 @@ public class LoadlineEditorFrame extends JFrame implements IView {
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
File file = DialogFactory.getInstance().showOpenDialog(FileFilterEnum.IMAGES.getFilter(),
|
||||
File file = DialogFactory.getInstance().showOpenDialog(LoadlineEditorFrame.this, FileFilterEnum.IMAGES.getFilter(),
|
||||
null, FileFilterEnum.IMAGES.getExtensions()[0], null);
|
||||
if (file != null) {
|
||||
FileInputStream fis;
|
||||
@@ -702,7 +708,7 @@ public class LoadlineEditorFrame extends JFrame implements IView {
|
||||
public LoadlineEditorAction() {
|
||||
super();
|
||||
putValue(Action.NAME, "Loadline Editor");
|
||||
// putValue(Action.SMALL_ICON, IconLoader.Delete.getIcon());
|
||||
putValue(Action.SMALL_ICON, IconLoader.Loadline.getIcon());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -39,8 +39,7 @@ import org.diylc.core.ExpansionMode;
|
||||
import org.diylc.core.Project;
|
||||
import org.diylc.images.IconLoader;
|
||||
import org.diylc.swing.ActionFactory;
|
||||
import org.diylc.swing.ISwingUI;
|
||||
import org.diylc.swing.loadline.LoadlineEditorFrame;
|
||||
import org.diylc.swing.ISwingUI;
|
||||
|
||||
public class EditMenuPlugin implements IPlugIn, ClipboardOwner {
|
||||
|
||||
@@ -322,8 +321,7 @@ public class EditMenuPlugin implements IPlugIn, ClipboardOwner {
|
||||
swingUI.injectMenuAction(null, EDIT_TITLE);
|
||||
swingUI.injectMenuAction(getFlexibleLeadsAction(), EDIT_TITLE);
|
||||
swingUI.injectMenuAction(null, EDIT_TITLE);
|
||||
swingUI.injectMenuAction(actionFactory.createEditProjectAction(plugInPort), EDIT_TITLE);
|
||||
swingUI.injectMenuAction(new LoadlineEditorFrame.LoadlineEditorAction(), EDIT_TITLE);
|
||||
swingUI.injectMenuAction(actionFactory.createEditProjectAction(plugInPort), EDIT_TITLE);
|
||||
|
||||
refreshActions();
|
||||
}
|
||||
|
||||
@@ -35,7 +35,8 @@ import org.diylc.common.IPlugInPort;
|
||||
import org.diylc.images.IconLoader;
|
||||
import org.diylc.swing.ActionFactory;
|
||||
import org.diylc.swing.IDynamicSubmenuHandler;
|
||||
import org.diylc.swing.ISwingUI;
|
||||
import org.diylc.swing.ISwingUI;
|
||||
import org.diylc.swing.loadline.LoadlineEditorFrame;
|
||||
|
||||
/**
|
||||
* Entry point class for File management utilities.
|
||||
@@ -103,7 +104,8 @@ public class FileMenuPlugin implements IPlugIn, IDynamicSubmenuHandler {
|
||||
swingUI.injectMenuAction(actionFactory.createExportBlocksAction(swingUI), INTEGRATION_TITLE);
|
||||
swingUI.injectMenuAction(null, INTEGRATION_TITLE);
|
||||
swingUI.injectMenuAction(actionFactory.createImportVariantsAction(swingUI, plugInPort), INTEGRATION_TITLE);
|
||||
swingUI.injectMenuAction(actionFactory.createExportVariantsAction(swingUI, plugInPort), INTEGRATION_TITLE);
|
||||
swingUI.injectMenuAction(actionFactory.createExportVariantsAction(swingUI, plugInPort), INTEGRATION_TITLE);
|
||||
swingUI.injectMenuAction(new LoadlineEditorFrame.LoadlineEditorAction(), FILE_TITLE);
|
||||
swingUI.injectMenuAction(null, FILE_TITLE);
|
||||
swingUI.injectMenuAction(actionFactory.createExitAction(plugInPort), FILE_TITLE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user