mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-11 01:32:08 +10:00
added layer locking
added eyelet board
This commit is contained in:
+3
-1
@@ -75,5 +75,7 @@ public enum EventType {
|
||||
* Called when mouse cursor is moved. Point object is passed, containing the
|
||||
* current cursor location (not taking zoom into account).
|
||||
*/
|
||||
MOUSE_MOVED;
|
||||
MOUSE_MOVED,
|
||||
LAYER_STATE_CHANGED;
|
||||
;
|
||||
}
|
||||
|
||||
+4
@@ -34,6 +34,8 @@ import com.diyfever.gui.update.VersionNumber;
|
||||
* @see EventType
|
||||
*/
|
||||
public interface IPlugInPort {
|
||||
|
||||
public static final String CHECK_BOX_MENU_ITEM = "org.diylc.checkBoxMenuItem";
|
||||
|
||||
/**
|
||||
* Returns size of the canvas that takes project dimensions into account as
|
||||
@@ -349,4 +351,6 @@ public interface IPlugInPort {
|
||||
* Ungroups all selected components.
|
||||
*/
|
||||
void ungroupSelectedComponents();
|
||||
|
||||
void setLayerLocked(int layerZOrder, boolean locked);
|
||||
}
|
||||
|
||||
+11
-4
@@ -1,26 +1,33 @@
|
||||
package org.diylc.common;
|
||||
|
||||
import java.awt.AlphaComposite;
|
||||
import java.awt.BasicStroke;
|
||||
import java.awt.Stroke;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Repository for object that may be reused, such as {@link Stroke} or
|
||||
* {@link AlphaComposite}.
|
||||
*
|
||||
* @author Branislav Stojkovic
|
||||
*/
|
||||
public class ObjectCache {
|
||||
|
||||
private static ObjectCache instance;
|
||||
|
||||
|
||||
public static ObjectCache getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new ObjectCache();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
private ObjectCache() {
|
||||
}
|
||||
|
||||
|
||||
private Map<Integer, Stroke> basicStrokeMap = new HashMap<Integer, Stroke>();
|
||||
|
||||
|
||||
public Stroke fetchBasicStroke(int width) {
|
||||
if (basicStrokeMap.containsKey(width)) {
|
||||
return basicStrokeMap.get(width);
|
||||
|
||||
Reference in New Issue
Block a user