mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
caching, initial push
This commit is contained in:
@@ -48,11 +48,12 @@ public class ComponentType {
|
|||||||
private IComponentTransformer transformer;
|
private IComponentTransformer transformer;
|
||||||
private KeywordPolicy keywordPolicy;
|
private KeywordPolicy keywordPolicy;
|
||||||
private String keywordTag;
|
private String keywordTag;
|
||||||
|
private boolean enableCache;
|
||||||
|
|
||||||
public ComponentType(String name, String description, CreationMethod creationMethod, String category,
|
public ComponentType(String name, String description, CreationMethod creationMethod, String category,
|
||||||
String namePrefix, String author, Icon icon, Class<? extends IDIYComponent<?>> instanceClass, double zOrder,
|
String namePrefix, String author, Icon icon, Class<? extends IDIYComponent<?>> instanceClass, double zOrder,
|
||||||
boolean flexibleZOrder, BomPolicy bomPolicy, boolean autoEdit, IComponentTransformer transformer,
|
boolean flexibleZOrder, BomPolicy bomPolicy, boolean autoEdit, IComponentTransformer transformer,
|
||||||
KeywordPolicy keywordPolicy, String keywordTag) {
|
KeywordPolicy keywordPolicy, String keywordTag, boolean enableCache) {
|
||||||
super();
|
super();
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.description = description;
|
this.description = description;
|
||||||
@@ -69,6 +70,7 @@ public class ComponentType {
|
|||||||
this.transformer = transformer;
|
this.transformer = transformer;
|
||||||
this.keywordPolicy = keywordPolicy;
|
this.keywordPolicy = keywordPolicy;
|
||||||
this.keywordTag = keywordTag;
|
this.keywordTag = keywordTag;
|
||||||
|
this.enableCache = enableCache;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
@@ -130,6 +132,10 @@ public class ComponentType {
|
|||||||
public String getKeywordTag() {
|
public String getKeywordTag() {
|
||||||
return keywordTag;
|
return keywordTag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean getEnableCache() {
|
||||||
|
return enableCache;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
|
|||||||
@@ -110,5 +110,12 @@ public @interface ComponentDescriptor {
|
|||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
String keywordTag() default "";
|
String keywordTag() default "";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Only to be used for components that span in its eternity in the rectangle defined by the two outside control points.
|
||||||
|
*
|
||||||
|
* @return true if the component drawing should be cached
|
||||||
|
*/
|
||||||
|
boolean enableCache() default false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,7 +93,8 @@ public class ComponentProcessor {
|
|||||||
double zOrder;
|
double zOrder;
|
||||||
boolean flexibleZOrder;
|
boolean flexibleZOrder;
|
||||||
BomPolicy bomPolicy;
|
BomPolicy bomPolicy;
|
||||||
boolean autoEdit;
|
boolean autoEdit;
|
||||||
|
boolean cacheDrawing;
|
||||||
IComponentTransformer transformer;
|
IComponentTransformer transformer;
|
||||||
KeywordPolicy keywordPolicy;
|
KeywordPolicy keywordPolicy;
|
||||||
String keywordTag;
|
String keywordTag;
|
||||||
@@ -111,7 +112,8 @@ public class ComponentProcessor {
|
|||||||
autoEdit = annotation.autoEdit();
|
autoEdit = annotation.autoEdit();
|
||||||
transformer = getComponentTransformer(annotation.transformer());
|
transformer = getComponentTransformer(annotation.transformer());
|
||||||
keywordPolicy = annotation.keywordPolicy();
|
keywordPolicy = annotation.keywordPolicy();
|
||||||
keywordTag = annotation.keywordTag();
|
keywordTag = annotation.keywordTag();
|
||||||
|
cacheDrawing = annotation.enableCache();
|
||||||
} else { // default
|
} else { // default
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -133,7 +135,7 @@ public class ComponentProcessor {
|
|||||||
}
|
}
|
||||||
ComponentType componentType =
|
ComponentType componentType =
|
||||||
new ComponentType(name, description, creationMethod, category, namePrefix, author, icon, clazz, zOrder,
|
new ComponentType(name, description, creationMethod, category, namePrefix, author, icon, clazz, zOrder,
|
||||||
flexibleZOrder, bomPolicy, autoEdit, transformer, keywordPolicy, keywordTag);
|
flexibleZOrder, bomPolicy, autoEdit, transformer, keywordPolicy, keywordTag, cacheDrawing);
|
||||||
componentTypeMap.put(clazz.getName(), componentType);
|
componentTypeMap.put(clazz.getName(), componentType);
|
||||||
return componentType;
|
return componentType;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,29 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
* DIY Layout Creator (DIYLC). Copyright (c) 2009-2018 held jointly by the individual authors.
|
||||||
|
*
|
||||||
|
* This file is part of DIYLC.
|
||||||
|
*
|
||||||
|
* DIYLC is free software: you can redistribute it and/or modify it under the terms of the GNU
|
||||||
|
* General Public License as published by the Free Software Foundation, either version 3 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* DIYLC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||||
|
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||||
|
* Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along with DIYLC. If not, see
|
||||||
|
* <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
package org.diylc.presenter;
|
package org.diylc.presenter;
|
||||||
|
|
||||||
import java.awt.geom.Point2D;
|
import java.awt.geom.Point2D;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents a continuity connection between two points.
|
||||||
|
*
|
||||||
|
* @author bancika
|
||||||
|
*/
|
||||||
public class Connection {
|
public class Connection {
|
||||||
|
|
||||||
private Point2D p1;
|
private Point2D p1;
|
||||||
|
|||||||
@@ -0,0 +1,147 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
* DIY Layout Creator (DIYLC). Copyright (c) 2009-2018 held jointly by the individual authors.
|
||||||
|
*
|
||||||
|
* This file is part of DIYLC.
|
||||||
|
*
|
||||||
|
* DIYLC is free software: you can redistribute it and/or modify it under the terms of the GNU
|
||||||
|
* General Public License as published by the Free Software Foundation, either version 3 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* DIYLC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
||||||
|
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||||
|
* Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along with DIYLC. If not, see
|
||||||
|
* <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package org.diylc.presenter;
|
||||||
|
|
||||||
|
import java.awt.Graphics2D;
|
||||||
|
import java.awt.Point;
|
||||||
|
import java.awt.image.BufferedImage;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.apache.log4j.Logger;
|
||||||
|
import org.diylc.common.ComponentType;
|
||||||
|
import org.diylc.core.ComponentState;
|
||||||
|
import org.diylc.core.IDIYComponent;
|
||||||
|
import org.diylc.core.IDrawingObserver;
|
||||||
|
import org.diylc.core.Project;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A layer that injects itself between the provided {@link G2DWrapper} instance and the underlying {@link Graphics2D} instance.
|
||||||
|
* For all components that are enabled for caching, it stores a {@link BufferedImage} representing the component.
|
||||||
|
* The state of the component is recorded and compared next time it needs to be rendered to make sure that the cache is up to date.
|
||||||
|
*
|
||||||
|
* @author bancika
|
||||||
|
*/
|
||||||
|
public class DrawingCache {
|
||||||
|
|
||||||
|
private Map<IDIYComponent<?>, CacheValue> imageCache = new HashMap<IDIYComponent<?>, CacheValue>();
|
||||||
|
|
||||||
|
private static final Logger LOG = Logger.getLogger(DrawingCache.class);
|
||||||
|
|
||||||
|
public static DrawingCache Instance = new DrawingCache();
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public void draw(IDIYComponent<?> component, G2DWrapper g2d, ComponentState componentState,
|
||||||
|
boolean outlineMode, Project project, double zoom, boolean trackArea) {
|
||||||
|
ComponentType type = ComponentProcessor.getInstance()
|
||||||
|
.extractComponentTypeFrom((Class<? extends IDIYComponent<?>>) component.getClass());
|
||||||
|
|
||||||
|
if (type.getEnableCache()) {
|
||||||
|
// if we need to apply caching
|
||||||
|
Point firstPoint = component.getControlPoint(0);
|
||||||
|
Point lastPoint = component.getControlPoint(component.getControlPointCount() - 1);
|
||||||
|
|
||||||
|
// cache hit!
|
||||||
|
CacheValue value = null;
|
||||||
|
if (imageCache.containsKey(component))
|
||||||
|
value = imageCache.get(component);
|
||||||
|
|
||||||
|
// only honor the cache if the component hasn't changed in the meantime
|
||||||
|
if (value == null || !value.getComponent().equalsTo(component) || value.getState() != componentState) {
|
||||||
|
LOG.trace("Rendering " + component.getName() + " for cache.");
|
||||||
|
int width = (int) (Math.abs(firstPoint.x - lastPoint.x) * zoom) + 2;
|
||||||
|
int height = (int) (Math.abs(firstPoint.y - lastPoint.y) * zoom) + 2;
|
||||||
|
BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
|
||||||
|
Graphics2D cg2d = image.createGraphics();
|
||||||
|
|
||||||
|
// copy over rendering settings
|
||||||
|
cg2d.setRenderingHints(g2d.getRenderingHints());
|
||||||
|
|
||||||
|
cg2d.setClip(0, 0, width, height);
|
||||||
|
|
||||||
|
// translate to make the top-left corner of the component match (0, 0)
|
||||||
|
cg2d.translate(-firstPoint.x, -firstPoint.y);
|
||||||
|
G2DWrapper wrapper = new G2DWrapper(cg2d, zoom);
|
||||||
|
|
||||||
|
wrapper.startedDrawingComponent();
|
||||||
|
if (!trackArea) {
|
||||||
|
wrapper.stopTracking();
|
||||||
|
}
|
||||||
|
|
||||||
|
// now draw the component to the buffer image
|
||||||
|
component.draw(wrapper, componentState, outlineMode, project, wrapper);
|
||||||
|
|
||||||
|
wrapper.finishedDrawingComponent();
|
||||||
|
|
||||||
|
cg2d.dispose();
|
||||||
|
|
||||||
|
value = new CacheValue(component, image, wrapper, componentState);
|
||||||
|
imageCache.put(component, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
// draw cached image
|
||||||
|
g2d.getCanvasGraphics().drawImage(value.getImage(), firstPoint.x, firstPoint.y, null);
|
||||||
|
|
||||||
|
// copy over tracking area from the cache
|
||||||
|
g2d.merge(value.getWrapper());
|
||||||
|
} else {
|
||||||
|
// no caching, just draw as usual
|
||||||
|
component.draw(g2d, componentState, outlineMode, project, g2d);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private class CacheValue {
|
||||||
|
IDIYComponent<?> component;
|
||||||
|
BufferedImage image;
|
||||||
|
G2DWrapper wrapper;
|
||||||
|
ComponentState state;
|
||||||
|
|
||||||
|
public CacheValue(IDIYComponent<?> component, BufferedImage image, G2DWrapper wrapper, ComponentState state) {
|
||||||
|
super();
|
||||||
|
// take a copy of the component, so we can check if it changed in the meantime
|
||||||
|
try {
|
||||||
|
this.component = component.clone();
|
||||||
|
} catch (CloneNotSupportedException e) {
|
||||||
|
}
|
||||||
|
this.image = image;
|
||||||
|
this.wrapper = wrapper;
|
||||||
|
this.state = state;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IDIYComponent<?> getComponent() {
|
||||||
|
return component;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BufferedImage getImage() {
|
||||||
|
return image;
|
||||||
|
}
|
||||||
|
|
||||||
|
public G2DWrapper getWrapper() {
|
||||||
|
return wrapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ComponentState getState() {
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return component.getName() + ":" + state;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -83,6 +83,7 @@ public class DrawingManager {
|
|||||||
private Theme theme = (Theme) ConfigurationManager.getInstance().readObject(IPlugInPort.THEME_KEY,
|
private Theme theme = (Theme) ConfigurationManager.getInstance().readObject(IPlugInPort.THEME_KEY,
|
||||||
Constants.DEFAULT_THEME);
|
Constants.DEFAULT_THEME);
|
||||||
|
|
||||||
|
// Maps keyed by object reference.
|
||||||
// Keeps Area object of each drawn component.
|
// Keeps Area object of each drawn component.
|
||||||
private Map<IDIYComponent<?>, ComponentArea> componentAreaMap;
|
private Map<IDIYComponent<?>, ComponentArea> componentAreaMap;
|
||||||
// Maps components to the last state they are drawn in. Also, used to
|
// Maps components to the last state they are drawn in. Also, used to
|
||||||
@@ -263,7 +264,7 @@ public class DrawingManager {
|
|||||||
// Do not track the area if component is not invalidated and was
|
// Do not track the area if component is not invalidated and was
|
||||||
// drawn in the same state.
|
// drawn in the same state.
|
||||||
boolean trackArea = lastDrawnStateMap.get(component) != state;
|
boolean trackArea = lastDrawnStateMap.get(component) != state;
|
||||||
|
|
||||||
synchronized (g2d) {
|
synchronized (g2d) {
|
||||||
g2dWrapper.startedDrawingComponent();
|
g2dWrapper.startedDrawingComponent();
|
||||||
if (!trackArea) {
|
if (!trackArea) {
|
||||||
@@ -275,11 +276,15 @@ public class DrawingManager {
|
|||||||
}
|
}
|
||||||
// Draw the component through the g2dWrapper.
|
// Draw the component through the g2dWrapper.
|
||||||
try {
|
try {
|
||||||
component.draw(g2dWrapper, state, drawOptions.contains(DrawOption.OUTLINE_MODE), project, g2dWrapper);
|
// component.draw(g2dWrapper, state, drawOptions.contains(DrawOption.OUTLINE_MODE), project, g2dWrapper);
|
||||||
|
DrawingCache.Instance.draw(component, g2dWrapper, state, drawOptions.contains(DrawOption.OUTLINE_MODE), project, zoom, trackArea);
|
||||||
if (g2dWrapper.isTrackingContinuityArea()) {
|
if (g2dWrapper.isTrackingContinuityArea()) {
|
||||||
LOG.info("Component " + component.getName() + " of type " + component.getClass().getName() + " did not stop tracking continuity area.");
|
LOG.info("Component " + component.getName() + " of type " + component.getClass().getName() + " did not stop tracking continuity area.");
|
||||||
g2dWrapper.stopTrackingContinuityArea();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// just in case, stop all tracking
|
||||||
|
g2dWrapper.stopTrackingContinuityArea();
|
||||||
|
g2dWrapper.stopTracking();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LOG.error("Error drawing " + component.getName(), e);
|
LOG.error("Error drawing " + component.getName(), e);
|
||||||
failedComponents.add(component);
|
failedComponents.add(component);
|
||||||
|
|||||||
@@ -120,6 +120,10 @@ class G2DWrapper extends Graphics2D implements IDrawingObserver {
|
|||||||
continuityMarker = null;
|
continuityMarker = null;
|
||||||
currentTx = new AffineTransform();
|
currentTx = new AffineTransform();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Graphics2D getCanvasGraphics() {
|
||||||
|
return canvasGraphics;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clears out the current area and caches canvas settings.
|
* Clears out the current area and caches canvas settings.
|
||||||
@@ -157,6 +161,12 @@ class G2DWrapper extends Graphics2D implements IDrawingObserver {
|
|||||||
// Map<String, Integer> sorted = sortByComparator(trackingStacks, false);
|
// Map<String, Integer> sorted = sortByComparator(trackingStacks, false);
|
||||||
return new ComponentArea(currentArea, continuityPositiveAreas.values(), continuityNegativeAreas.values());
|
return new ComponentArea(currentArea, continuityPositiveAreas.values(), continuityNegativeAreas.values());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void merge(G2DWrapper wrapper) {
|
||||||
|
currentArea = wrapper.currentArea;
|
||||||
|
continuityPositiveAreas = wrapper.continuityPositiveAreas;
|
||||||
|
continuityNegativeAreas = wrapper.continuityNegativeAreas;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void startTracking() {
|
public void startTracking() {
|
||||||
@@ -721,6 +731,7 @@ class G2DWrapper extends Graphics2D implements IDrawingObserver {
|
|||||||
canvasGraphics.setXORMode(c1);
|
canvasGraphics.setXORMode(c1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
private static Map<String, Integer> sortByComparator(Map<String, Integer> unsortMap,
|
private static Map<String, Integer> sortByComparator(Map<String, Integer> unsortMap,
|
||||||
final boolean order) {
|
final boolean order) {
|
||||||
List<Entry<String, Integer>> list =
|
List<Entry<String, Integer>> list =
|
||||||
|
|||||||
@@ -65,10 +65,10 @@ public class InstantiationManager {
|
|||||||
|
|
||||||
public static final ComponentType clipboardType = new ComponentType("Clipboard contents",
|
public static final ComponentType clipboardType = new ComponentType("Clipboard contents",
|
||||||
"Components from the clipboard", CreationMethod.SINGLE_CLICK, "Multi", "", "", null, null, 0, false, null,
|
"Components from the clipboard", CreationMethod.SINGLE_CLICK, "Multi", "", "", null, null, 0, false, null,
|
||||||
false, null, KeywordPolicy.NEVER_SHOW, null);
|
false, null, KeywordPolicy.NEVER_SHOW, null, false);
|
||||||
public static final ComponentType blockType = new ComponentType("Building block",
|
public static final ComponentType blockType = new ComponentType("Building block",
|
||||||
"Components from the building block", CreationMethod.SINGLE_CLICK, "Multi", "", "", null, null, 0, false, null,
|
"Components from the building block", CreationMethod.SINGLE_CLICK, "Multi", "", "", null, null, 0, false, null,
|
||||||
false, null, KeywordPolicy.NEVER_SHOW, null);
|
false, null, KeywordPolicy.NEVER_SHOW, null, false);
|
||||||
|
|
||||||
public InstantiationManager() {}
|
public InstantiationManager() {}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@@ -49,7 +49,7 @@ import org.diylc.core.measures.SizeUnit;
|
|||||||
@ComponentDescriptor(name = "Breadboard", category = "Boards", author = "Branislav Stojkovic",
|
@ComponentDescriptor(name = "Breadboard", category = "Boards", author = "Branislav Stojkovic",
|
||||||
description = "Prototyping solderless breadboard", instanceNamePrefix = "BB",
|
description = "Prototyping solderless breadboard", instanceNamePrefix = "BB",
|
||||||
zOrder = IDIYComponent.BOARD, bomPolicy = BomPolicy.SHOW_ONLY_TYPE_NAME, autoEdit = false,
|
zOrder = IDIYComponent.BOARD, bomPolicy = BomPolicy.SHOW_ONLY_TYPE_NAME, autoEdit = false,
|
||||||
keywordPolicy = KeywordPolicy.SHOW_TYPE_NAME)
|
keywordPolicy = KeywordPolicy.SHOW_TYPE_NAME, enableCache = true)
|
||||||
public class Breadboard extends AbstractComponent<Void> {
|
public class Breadboard extends AbstractComponent<Void> {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ import org.diylc.utils.Constants;
|
|||||||
@ComponentDescriptor(name = "Eyelet Board", category = "Boards", author = "Branislav Stojkovic",
|
@ComponentDescriptor(name = "Eyelet Board", category = "Boards", author = "Branislav Stojkovic",
|
||||||
zOrder = IDIYComponent.BOARD, instanceNamePrefix = "Board", description = "Perforated board with eyelets",
|
zOrder = IDIYComponent.BOARD, instanceNamePrefix = "Board", description = "Perforated board with eyelets",
|
||||||
bomPolicy = BomPolicy.SHOW_ONLY_TYPE_NAME, autoEdit = false, keywordPolicy = KeywordPolicy.SHOW_TYPE_NAME,
|
bomPolicy = BomPolicy.SHOW_ONLY_TYPE_NAME, autoEdit = false, keywordPolicy = KeywordPolicy.SHOW_TYPE_NAME,
|
||||||
transformer = SimpleComponentTransformer.class)
|
transformer = SimpleComponentTransformer.class, enableCache = true)
|
||||||
public class EyeletBoard extends AbstractBoard {
|
public class EyeletBoard extends AbstractBoard {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ import org.diylc.utils.Constants;
|
|||||||
@ComponentDescriptor(name = "Perf Board w/ Pads", category = "Boards", author = "Branislav Stojkovic",
|
@ComponentDescriptor(name = "Perf Board w/ Pads", category = "Boards", author = "Branislav Stojkovic",
|
||||||
zOrder = IDIYComponent.BOARD, instanceNamePrefix = "Board", description = "Perforated board with solder pads",
|
zOrder = IDIYComponent.BOARD, instanceNamePrefix = "Board", description = "Perforated board with solder pads",
|
||||||
bomPolicy = BomPolicy.SHOW_ONLY_TYPE_NAME, autoEdit = false, keywordPolicy = KeywordPolicy.SHOW_TAG,
|
bomPolicy = BomPolicy.SHOW_ONLY_TYPE_NAME, autoEdit = false, keywordPolicy = KeywordPolicy.SHOW_TAG,
|
||||||
keywordTag = "Perf Board", transformer = SimpleComponentTransformer.class)
|
keywordTag = "Perf Board", transformer = SimpleComponentTransformer.class, enableCache = true)
|
||||||
public class PerfBoard extends AbstractBoard {
|
public class PerfBoard extends AbstractBoard {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ import org.diylc.core.measures.SizeUnit;
|
|||||||
@ComponentDescriptor(name = "P-0+o (Proto) Board", category = "Boards", author = "Branislav Stojkovic",
|
@ComponentDescriptor(name = "P-0+o (Proto) Board", category = "Boards", author = "Branislav Stojkovic",
|
||||||
description = "A prototyping board for modular synths, central bus with V+ GND and V-", instanceNamePrefix = "BB",
|
description = "A prototyping board for modular synths, central bus with V+ GND and V-", instanceNamePrefix = "BB",
|
||||||
zOrder = IDIYComponent.BOARD, bomPolicy = BomPolicy.SHOW_ONLY_TYPE_NAME, autoEdit = false,
|
zOrder = IDIYComponent.BOARD, bomPolicy = BomPolicy.SHOW_ONLY_TYPE_NAME, autoEdit = false,
|
||||||
keywordPolicy = KeywordPolicy.SHOW_TYPE_NAME)
|
keywordPolicy = KeywordPolicy.SHOW_TYPE_NAME, enableCache = true)
|
||||||
public class ProtoBoard extends AbstractComponent<Void> {
|
public class ProtoBoard extends AbstractComponent<Void> {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ import org.diylc.utils.Constants;
|
|||||||
@ComponentDescriptor(name = "TriPad Board", category = "Boards", author = "Hauke Juhls", zOrder = IDIYComponent.BOARD,
|
@ComponentDescriptor(name = "TriPad Board", category = "Boards", author = "Hauke Juhls", zOrder = IDIYComponent.BOARD,
|
||||||
instanceNamePrefix = "Board",
|
instanceNamePrefix = "Board",
|
||||||
description = "Perforated FR4 board with copper strips connecting 3 holes in a row (aka TriPad Board)",
|
description = "Perforated FR4 board with copper strips connecting 3 holes in a row (aka TriPad Board)",
|
||||||
keywordPolicy = KeywordPolicy.SHOW_TYPE_NAME, transformer = SimpleComponentTransformer.class)
|
keywordPolicy = KeywordPolicy.SHOW_TYPE_NAME, transformer = SimpleComponentTransformer.class, enableCache = true)
|
||||||
public class TriPadBoard extends AbstractBoard {
|
public class TriPadBoard extends AbstractBoard {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ import org.diylc.utils.Constants;
|
|||||||
zOrder = IDIYComponent.BOARD, instanceNamePrefix = "Board",
|
zOrder = IDIYComponent.BOARD, instanceNamePrefix = "Board",
|
||||||
description = "Perforated FR4 board with copper strips connecting all holes in a row",
|
description = "Perforated FR4 board with copper strips connecting all holes in a row",
|
||||||
bomPolicy = BomPolicy.SHOW_ONLY_TYPE_NAME, autoEdit = false, keywordPolicy = KeywordPolicy.SHOW_TYPE_NAME,
|
bomPolicy = BomPolicy.SHOW_ONLY_TYPE_NAME, autoEdit = false, keywordPolicy = KeywordPolicy.SHOW_TYPE_NAME,
|
||||||
transformer = SimpleComponentTransformer.class)
|
transformer = SimpleComponentTransformer.class, enableCache = true)
|
||||||
public class VeroBoard extends AbstractBoard {
|
public class VeroBoard extends AbstractBoard {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user